File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-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 : any = { }
43+ const data : Record < string , string > = { }
4444
4545 lines . forEach ( line => {
4646 if ( line . includes ( '*İsim:*' ) ) data . name = line . split ( '*İsim:*' ) [ 1 ] . trim ( )
@@ -61,14 +61,14 @@ function parseToolFromMessage(text: string) {
6161 return data
6262}
6363
64- async function addPendingTool ( toolData : any ) {
64+ async function addPendingTool ( toolData : Record < string , string | boolean > ) {
6565 const filePath = path . join ( process . cwd ( ) , 'lib' , 'pending-tools.json' )
6666 let pendingTools = [ ]
6767
6868 try {
6969 const fileContent = fs . readFileSync ( filePath , 'utf-8' )
7070 pendingTools = JSON . parse ( fileContent )
71- } catch ( error ) {
71+ } catch {
7272 // File doesn't exist or is empty
7373 }
7474
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export interface Tool {
1515// Pending tools'u yükle
1616let pendingTools : Tool [ ] = [ ]
1717try {
18+ // eslint-disable-next-line @typescript-eslint/no-require-imports
1819 pendingTools = require ( './pending-tools.json' )
1920} catch {
2021 // Dosya yoksa boş array
You can’t perform that action at this time.
0 commit comments