Description
Context
Right now, on the front-end, we need to pass in a token (i.e. the user needs to be logged in) before they can see a list of resource.
axios
.get('/api/v1/resources', {
headers: {
Authorization: `Bearer ${authContext.authTokens.token}`,
},
})
This should be true for when users are creating a resource, but the list of resources on https://cb-react-concept.netlify.com/resources should be available to the public.
Acceptance Criteria
[ ] Make GET /resources not protected by authorization
[ ] Change setup for tests to make sure we're not authed for the GET requests, but are authed for POST, PATCH, and search.
[ ] Add test to make sure GET /api/v1/resources/{{guid}}/ and GET /api/v1/resources/ requests and search work without a token
[ ] Add/alter tests for GET GET /api/v1/resources/{{guid}}/ and GET /api/v1/resources/ requests and search to ensure that they also work with a token
[ ] Add tests to make sure PATCH and POST fail without a token
[ ] Add test to make sure DEL fails without a token