Fix MemberMiddleware in the API
Closes no issue.
Previous behaviour
Steps to reproduce:
curl -X POST http://127.0.0.1:8000/api/v1/token-auth/ -H 'Content-Type: application/json' -d '{"username": "PUT_USERNAME_HERE", "password": "PUT_PASSWORD_HERE"}'
- Copy the resulting token
curl -X GET http://127.0.0.1:8000/api/v1/members/me/ -H 'Authorization: Token PUT_TOKEN_HERE'
- Notice that the output is empty.
New behaviour
Steps to validate that it works:
curl -X POST http://127.0.0.1:8000/api/v1/token-auth/ -H 'Content-Type: application/json' -d '{"username": "PUT_USERNAME_HERE", "password": "PUT_PASSWORD_HERE"}'
- Copy the resulting token
curl -X GET http://127.0.0.1:8000/api/v1/members/me/ -H 'Authorization: Token PUT_TOKEN_HERE'
- Notice that the output is no longer empty.
Edited by Tom van Bussel