There was an error while loading. Please reload this page.
1 parent 998f5d8 commit fe74c61Copy full SHA for fe74c61
1 file changed
web/src/redux/user/userSlice.js
@@ -6,12 +6,12 @@ import { API_ROOT } from '~/utils/constants'
6
const initialState = { currentUser: null }
7
8
export const loginUserAPI = createAsyncThunk('activeBoard/loginUserAPI', async (data) => {
9
- const response = await authorizedAxiosInstance.post(`${API_ROOT}/v1/users/login`, data)
+ const response = await authorizedAxiosInstance.post('/v1/users/login', data)
10
return response.data
11
})
12
13
export const logoutUserAPI = createAsyncThunk('user/logoutUserAPI', async (showSuccessMessage) => {
14
- const response = await authorizedAxiosInstance.delete(`${API_ROOT}/v1/users/logout`)
+ const response = await authorizedAxiosInstance.delete('/v1/users/logout')
15
if (showSuccessMessage) {
16
toast.success('Logged out successfully')
17
}
0 commit comments