diff --git a/client/src/Api.ts b/client/src/Api.ts index d6dcfa7..8706b69 100644 --- a/client/src/Api.ts +++ b/client/src/Api.ts @@ -104,8 +104,8 @@ export const login = async (login?: string) => { return await api.post<any, any>('/api/login', JSON.stringify({ login })); } -export const changeDepartureTime = async (login: string, time: string, dayIndex?: number) => { - return await api.post<any, any>('/api/changeDepartureTime', JSON.stringify({ login, time, dayIndex })); +export const changeDepartureTime = async (time: string, dayIndex?: number) => { + return await api.post<any, any>('/api/changeDepartureTime', JSON.stringify({ time, dayIndex })); } export const updatePizzaFee = async (login: string, text?: string, price?: number) => { diff --git a/client/src/App.tsx b/client/src/App.tsx index d5abf2b..4ba14bf 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -268,9 +268,7 @@ function App() { const handleChangeDepartureTime = async (event: React.ChangeEvent<HTMLSelectElement>) => { if (foodChoiceList?.length && choiceRef.current?.value) { - if (auth?.login) { - await changeDepartureTime(auth.login, event.target.value, dayIndex); - } + await changeDepartureTime(event.target.value, dayIndex); } }