File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export async function POST(request: NextRequest) {
4040
4141function parseToolFromMessage ( text : string ) {
4242 const lines = text . split ( '\n' )
43- const data : Record < string , string > = { }
43+ const data : Record < string , string | string [ ] | boolean > = { }
4444
4545 lines . forEach ( line => {
4646 if ( line . includes ( '*İsim:*' ) ) data . name = line . split ( '*İsim:*' ) [ 1 ] . trim ( )
@@ -51,7 +51,7 @@ function parseToolFromMessage(text: string) {
5151 } )
5252
5353 // Generate ID
54- data . id = data . name ?. toLowerCase ( ) . replace ( / \s + / g, '-' ) . replace ( / [ ^ a - z 0 - 9 - ] / g, '' ) || 'tool-' + Date . now ( )
54+ data . id = ( data . name as string ) ?. toLowerCase ( ) . replace ( / \s + / g, '-' ) . replace ( / [ ^ a - z 0 - 9 - ] / g, '' ) || 'tool-' + Date . now ( )
5555 data . fileName = `${ data . id } .${ data . language === 'python' ? 'py' : 'bat' } `
5656 data . features = [ 'Önizleme aracı' , 'Topluluk katkısı' ]
5757 data . code = '# Kod yakında eklenecek'
@@ -61,7 +61,7 @@ function parseToolFromMessage(text: string) {
6161 return data
6262}
6363
64- async function addPendingTool ( toolData : Record < string , string | boolean > ) {
64+ async function addPendingTool ( toolData : Record < string , string | string [ ] | boolean > ) {
6565 const filePath = path . join ( process . cwd ( ) , 'lib' , 'pending-tools.json' )
6666 let pendingTools = [ ]
6767
You can’t perform that action at this time.
0 commit comments