Thursday 18 October 2018

Loopback question: I keep getting a 401 status error when I try to use a custom method.

I've taken over a react-native project that uses Loopback. The previous developer created a Model called "account". In it there are a bunch of custom methods that he created. They all work properly. However, when I created my own method called "deleteSingleHearingTest". It is never reached. I keep getting a 401 status error message. Inside the account.json file I've updated the ACL object to include this: { "accessType": "EXECUTE", "principalType": "ROLE", "principalId": "authenticated", "permission": "ALLOW", "property": "deleteSingleHearingTest" } Is there any other place I need to make sure I give an authenticated user permission?

Submitted October 19, 2018 at 03:39AM by jjssjj71

No comments:

Post a Comment