Rename shelves/get endpoint to shelf/getAll for consistency

This commit is contained in:
Robbie Antenesse 2020-02-04 15:00:45 -07:00
parent b99bdfc562
commit a596e685d6
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ export class ShelvesController extends ViewController {
} }
getUserShelves () { getUserShelves () {
return fetch('/api/shelves/get').then(response => response.json()).then(shelves => { return fetch('/api/shelf/getAll').then(response => response.json()).then(shelves => {
this.state.myShelves = shelves; this.state.myShelves = shelves;
}); });
} }

View File

@ -7,7 +7,7 @@ async function routes(fastify, options) {
return false; return false;
}); });
fastify.get('/api/shelves/get', async (request, reply) => { fastify.get('/api/shelf/getAll', async (request, reply) => {
if (!request.isLoggedInUser) { if (!request.isLoggedInUser) {
return reply.code(400).send({ return reply.code(400).send({
error: true, error: true,