In the StrongLoop API Explorer I have the option to query:
/People/{id}/food_prefs
Person is based on the built in User model. This query should return a JSON list of all the food_prefs for that Person (User). Instead I get a 401 error about authorization.
The model relations are thus:
Person has many food_prefs
food_pref belongs to Person (foreign key: personId)
food_pref model looks like this:
property: type : number
property: personId : number
When I send a request to Person/{id}/food_pref I get an error 401:
{
"error": {
"name": "Error",
"status": 401,
"message": "Authorization Required",
"statusCode": 401,
"code": "AUTHORIZATION_REQUIRED",
"stack": "Error: Authorization Required\n
}
I've not yet set up any ACL's, but even when I do set it up for access to everyone, I still get this error. Why?