You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mirage is giving string as response when we tried to return array in endpoint and it returns as object when we tried to return only one object from array:
Bug or question
mirage is giving string as response when we tried to return array in endpoint and it returns as object when we tried to return only one object from array:
Illustration:
I have below endpoints:
this.get('/users/:id',function(schema,request){ return schema.users.findBy({id:request.params.id}) }
this.get('/users',function(schema,request){ return schema.users.all() }
In test environment, both are working fine whereas in dev environment, second endpoint is giving response in string instead of an array.
The text was updated successfully, but these errors were encountered: