diff options
author | Michael Hunteman <michael@huntm.net> | 2024-08-30 14:45:50 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-08-30 14:45:50 -0700 |
commit | 340193f1d52e1b68fe950974d1003b9330e06fe3 (patch) | |
tree | 68dc6ddc99a0bffaf47dfa7f7bf591103b0d36d2 /client/src/slices/api | |
parent | 1d2ffb8a2b6af752b6fd091e8e59682625c2b495 (diff) |
Update material react table to have party guests
Diffstat (limited to 'client/src/slices/api')
-rw-r--r-- | client/src/slices/api/adminSlice.ts | 27 | ||||
-rw-r--r-- | client/src/slices/api/guestSlice.ts | 31 |
2 files changed, 6 insertions, 52 deletions
diff --git a/client/src/slices/api/adminSlice.ts b/client/src/slices/api/adminSlice.ts index cd1638d..bd69502 100644 --- a/client/src/slices/api/adminSlice.ts +++ b/client/src/slices/api/adminSlice.ts @@ -1,31 +1,6 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import type { RootState } from '../../store'; - -export interface Guest { - id: number; - firstName: string; - lastName: string; - attendance: string; - email: string; - message: string; - partySize: number; - partyList: Array<PartyGuest>; -} - -export interface PartyGuest { - firstName: string; - lastName: string; -} - -export interface AdminLoginRequest { - username: string; - password: string; -} - -export interface AdminLoginResponse { - guests: Guest[]; - token: string; -} +import type { AdminLoginRequest, AdminLoginResponse } from '../../models'; export const adminSlice = createApi({ reducerPath: 'adminApi', diff --git a/client/src/slices/api/guestSlice.ts b/client/src/slices/api/guestSlice.ts index b009ff0..fab0454 100644 --- a/client/src/slices/api/guestSlice.ts +++ b/client/src/slices/api/guestSlice.ts @@ -1,31 +1,10 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import type { RootState } from '../../store'; - -export interface GuestLoginRequest { - firstName: string; - lastName: string; -} - -export interface GuestLoginResponse { - guest: Guest; - token: string; -} - -export interface Guest { - id: number; - firstName: string; - lastName: string; - attendance: string; - email: string; - message: string; - partySize: number; - partyList: Array<PartyGuest>; -} - -export interface PartyGuest { - firstName: string; - lastName: string; -} +import type { + Guest, + GuestLoginRequest, + GuestLoginResponse, +} from '../../models'; export const guestSlice = createApi({ reducerPath: 'guestApi', |