From 1d2ffb8a2b6af752b6fd091e8e59682625c2b495 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Wed, 28 Aug 2024 18:07:22 -0700 Subject: Make guests endpoint plural --- client/src/components/Rsvp.tsx | 2 +- client/src/main.tsx | 2 +- client/src/mocks/handlers.ts | 4 ++-- client/src/pages.ts | 2 +- client/src/slices/api/guestSlice.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'client') diff --git a/client/src/components/Rsvp.tsx b/client/src/components/Rsvp.tsx index ab83cd7..d694393 100644 --- a/client/src/components/Rsvp.tsx +++ b/client/src/components/Rsvp.tsx @@ -22,7 +22,7 @@ function Rsvp() { ) : ( - + ); } diff --git a/client/src/main.tsx b/client/src/main.tsx index 2268d5f..fff9446 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -33,7 +33,7 @@ const router = createBrowserRouter([ element: , }, { - path: 'guest/login', + path: 'guests/login', element: , }, { diff --git a/client/src/mocks/handlers.ts b/client/src/mocks/handlers.ts index 8dc92b7..0e882ee 100644 --- a/client/src/mocks/handlers.ts +++ b/client/src/mocks/handlers.ts @@ -4,7 +4,7 @@ import { nanoid } from '@reduxjs/toolkit'; const token = nanoid(); export const handlers = [ - http.post('/guest/login', () => { + http.post('/guests/login', () => { return HttpResponse.json({ guest: { id: 1, @@ -17,7 +17,7 @@ export const handlers = [ token, }); }), - http.patch('/guest/1', () => { + http.patch('/guests/1', () => { return HttpResponse.json({ id: 1, firstName: 'Michael', diff --git a/client/src/pages.ts b/client/src/pages.ts index 5ebb9c4..4b0ec9d 100644 --- a/client/src/pages.ts +++ b/client/src/pages.ts @@ -1,7 +1,7 @@ const pages = [ { name: 'Home', to: '/' }, { name: 'Schedule', to: '/schedule' }, - { name: 'RSVP', to: '/guest/login' }, + { name: 'RSVP', to: '/guests/login' }, { name: 'Registry', to: '/registry' }, { name: 'Dashboard', to: '/admin/login' }, ]; diff --git a/client/src/slices/api/guestSlice.ts b/client/src/slices/api/guestSlice.ts index 38deb9a..b009ff0 100644 --- a/client/src/slices/api/guestSlice.ts +++ b/client/src/slices/api/guestSlice.ts @@ -30,7 +30,7 @@ export interface PartyGuest { export const guestSlice = createApi({ reducerPath: 'guestApi', baseQuery: fetchBaseQuery({ - baseUrl: import.meta.env.VITE_BASE_URL + 'guest/', + baseUrl: import.meta.env.VITE_BASE_URL + 'guests/', prepareHeaders: (headers, { getState }) => { const token = (getState() as RootState).guest.token; if (token) { -- cgit v1.2.3