feat: change password modal

This commit is contained in:
zerosoul
2022-05-07 16:41:41 +08:00
parent 79245b64f3
commit 7f89014259
3 changed files with 144 additions and 4 deletions
+8
View File
@@ -83,6 +83,13 @@ export const authApi = createApi({
body: { magic_token: token },
}),
}),
updatePassword: builder.mutation({
query: ({ old_password, new_password }) => ({
url: "user/change_password",
method: "POST",
body: { old_password, new_password },
}),
}),
getMetamaskNonce: builder.query({
query: (address) => ({
url: `/token/metamask/nonce?public_address=${address}`,
@@ -102,4 +109,5 @@ export const {
useLoginMutation,
useLazyLogoutQuery,
useCheckInviteTokenValidMutation,
useUpdatePasswordMutation,
} = authApi;