File tree Expand file tree Collapse file tree 2 files changed +2
-27
lines changed
packages/mcp-server-supabase Expand file tree Collapse file tree 2 files changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -355,9 +355,7 @@ export function createSupabaseMcpServer(options: SupabaseMcpServerOptions) {
355
355
ref : project_id ,
356
356
} ,
357
357
query : {
358
- // Limit to the last minute
359
- iso_timestamp_start : new Date ( now - 60 * 1000 ) . toISOString ( ) ,
360
- iso_timestamp_end : new Date ( now ) . toISOString ( ) ,
358
+ // Omitting start and end time defaults to the last minute
361
359
sql : getLogQuery ( service ) ,
362
360
} ,
363
361
} ,
Original file line number Diff line number Diff line change @@ -265,10 +265,7 @@ export const mockManagementApi = [
265
265
/**
266
266
* Get logs for a project
267
267
*/
268
- http . get <
269
- { projectId : string } ,
270
- { iso_timestamp_start : string ; iso_timestamp_end : string ; sql : string }
271
- > (
268
+ http . get < { projectId : string } , { sql : string } > (
272
269
`${ API_URL } /v1/projects/:projectId/analytics/endpoints/logs.all` ,
273
270
async ( { params, request } ) => {
274
271
const project = mockProjects . get ( params . projectId ) ;
@@ -279,26 +276,6 @@ export const mockManagementApi = [
279
276
) ;
280
277
}
281
278
282
- const url = new URL ( request . url ) ;
283
-
284
- const iso_timestamp_start =
285
- url . searchParams . get ( 'iso_timestamp_start' ) ?? undefined ;
286
- const iso_timestamp_end =
287
- url . searchParams . get ( 'iso_timestamp_end' ) ?? undefined ;
288
- const sql = url . searchParams . get ( 'sql' ) ?? undefined ;
289
-
290
- if ( ! iso_timestamp_start || ! iso_timestamp_end || ! sql ) {
291
- return HttpResponse . json (
292
- { message : 'Missing required query parameters' } ,
293
- { status : 400 }
294
- ) ;
295
- }
296
-
297
- const start = new Date ( iso_timestamp_start ) ;
298
- const end = new Date ( iso_timestamp_end ) ;
299
-
300
- expect ( end . getTime ( ) - start . getTime ( ) ) . toBeLessThanOrEqual ( 60 * 1000 ) ;
301
-
302
279
return HttpResponse . json ( [ ] ) ;
303
280
}
304
281
) ,
You can’t perform that action at this time.
0 commit comments