File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ export async function startMockServer() {
4747 baseUrl : '/api/v1' ,
4848 logRequests : true ,
4949 customHandlers : [
50- // Handle /api/v1/index.json for ObjectStackClient.connect()
51- http . get ( '/api/v1/index.json ' , async ( ) => {
50+ // Handle /api/v1 for ObjectStackClient.connect()
51+ http . get ( '/api/v1' , async ( ) => {
5252 return HttpResponse . json ( {
5353 version : '1.0' ,
5454 objects : [ 'contact' , 'opportunity' , 'account' ] ,
@@ -58,9 +58,15 @@ export async function startMockServer() {
5858 }
5959 } ) ;
6060 } ) ,
61- // Explicitly handle all metadata requests to prevent pass-through
62- http . get ( '/api/v1/metadata/*' , async ( ) => {
63- return HttpResponse . json ( { } ) ;
61+ http . get ( '/api/v1/' , async ( ) => {
62+ return HttpResponse . json ( {
63+ version : '1.0' ,
64+ objects : [ 'contact' , 'opportunity' , 'account' ] ,
65+ endpoints : {
66+ data : '/api/v1/data' ,
67+ metadata : '/api/v1/metadata'
68+ }
69+ } ) ;
6470 } ) ,
6571 http . get ( '/api/bootstrap' , async ( ) => {
6672 const contacts = await driver . find ( 'contact' , { object : 'contact' } ) ;
You can’t perform that action at this time.
0 commit comments