diff options
Diffstat (limited to 'client/src/slices')
-rw-r--r-- | client/src/slices/api/adminSlice.ts | 4 | ||||
-rw-r--r-- | client/src/slices/api/guestSlice.ts | 12 |
2 files changed, 6 insertions, 10 deletions
diff --git a/client/src/slices/api/adminSlice.ts b/client/src/slices/api/adminSlice.ts index bd69502..5de5c4d 100644 --- a/client/src/slices/api/adminSlice.ts +++ b/client/src/slices/api/adminSlice.ts @@ -1,6 +1,6 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import type { RootState } from '../../store'; -import type { AdminLoginRequest, AdminLoginResponse } from '../../models'; +import type { Credentials, AdminLogin } from '../../models'; export const adminSlice = createApi({ reducerPath: 'adminApi', @@ -15,7 +15,7 @@ export const adminSlice = createApi({ }, }), endpoints: (builder) => ({ - loginAdmin: builder.mutation<AdminLoginResponse, AdminLoginRequest>({ + loginAdmin: builder.mutation<AdminLogin, Credentials>({ query: (credentials) => ({ url: 'admin/login', method: 'POST', diff --git a/client/src/slices/api/guestSlice.ts b/client/src/slices/api/guestSlice.ts index a7dbcc4..312a665 100644 --- a/client/src/slices/api/guestSlice.ts +++ b/client/src/slices/api/guestSlice.ts @@ -1,10 +1,6 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import type { RootState } from '../../store'; -import type { - Guest, - GuestLoginRequest, - GuestLoginResponse, -} from '../../models'; +import type { Guest, Name, GuestLogin } from '../../models'; export const guestSlice = createApi({ reducerPath: 'guestApi', @@ -19,11 +15,11 @@ export const guestSlice = createApi({ }, }), endpoints: (builder) => ({ - loginGuest: builder.mutation<GuestLoginResponse, GuestLoginRequest>({ - query: (credentials) => ({ + loginGuest: builder.mutation<GuestLogin, Name>({ + query: (name) => ({ url: 'login', method: 'POST', - body: credentials, + body: name, }), }), updateGuest: builder.mutation<Guest, Guest>({ |