J
J
JIakki2016-06-28 12:08:56
Node.js
JIakki, 2016-06-28 12:08:56

Node.js loopback 401 when getting data?

I have a Todo model, here is the access:

"relations": {
    "person": {
      "type": "belongsTo",
      "model": "Person",
      "foreignKey": "personId"
    }
  },
  "acls": [
    {
      "accessType": "*",
      "principalType": "ROLE",
      "principalId": "$everyone",
      "permission": "DENY"
    },

     {
      "accessType": "*",
      "principalType": "ROLE",
      "principalId": "$owner",
      "permission": "ALLOW"
    }
  ],

And the Person model which is related to Todo:
"relations": {
    "todos": {
      "type": "hasMany",
      "model": "Todo",
      "foreignKey": "personId"
    }
  }

When I send a request with a token to GET /todos, I get 401 with an existing person.
If anyone knows what's wrong, I will be glad for the answer
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2016-06-28
@bingo347

http status 401
and in general, a self-respecting web developer should know http statuses as a multiplication table

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question