Skip to content

Commit ab2d889

Browse files
Fix body type when requesting password reset (#3511)
The body should be a JSON object with an `.email` property.
1 parent f29eeb7 commit ab2d889

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/reducers/auth.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,12 @@ export const logout = createAsyncThunk('auth/logout', async () => {
168168
Session.unset();
169169
});
170170

171-
export const resetPassword = createAsyncThunk('auth/resetPassword', async (email: string) => {
172-
await uwFetch<void>(['/auth/password/reset', { method: 'post', data: email }]);
171+
export const resetPassword = createAsyncThunk('auth/resetPassword', async (email: string, api) => {
172+
await uwFetch<void>(['/auth/password/reset', {
173+
method: 'post',
174+
data: { email },
175+
signal: api.signal,
176+
}]);
173177
});
174178

175179
const slice = createSlice({

0 commit comments

Comments
 (0)