stockpile-co / api

The API for Stockpile, an app that manages stuff for organizations.
0 stars 1 forks source link

Fix 401 Unauthorized on get user endpoint #181

Closed AdamVig closed 7 years ago

AdamVig commented 7 years ago

GET /user/:userID

Token is for the user that the request is trying to access (userID matches).

401 Unauthorized

must be an administrator to access other users' data

AdamVig commented 7 years ago

Was not able to reproduce. @emmanuelroussel can you write out the steps to reproduce the bug?

emroussel commented 7 years ago

This is strange, the steps you described above are right.

  1. POST /auth with credentials
  2. GET /user/:userID with token received above (userID of the account)

I tried with two different accounts, same problem.

AdamVig commented 7 years ago

Restarted the server and the problem went away. 🙄