refactor: register procession

This commit is contained in:
Tristan Yang
2022-06-21 16:10:13 +08:00
parent aca0afee90
commit 066f797b26
7 changed files with 58 additions and 23 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
// const BASE_URL = `${location.origin}/api`;
const BASE_URL = `https://dev.rustchat.com/api`;
export const CACHE_VERSION = `0.2.17`;
export const CACHE_VERSION = `0.3.0`;
export const ContentTypes = {
text: "text/plain",
markdown: "text/markdown",
+6
View File
@@ -132,6 +132,11 @@ export const authApi = createApi({
url: `/token/metamask/nonce?public_address=${address}`
})
}),
checkEmail: builder.query({
query: (email) => ({
url: `/user/check_email?email=${encodeURIComponent(email)}`
})
}),
getCredentials: builder.query({
query: () => ({
url: `/token/credentials`
@@ -165,6 +170,7 @@ export const authApi = createApi({
});
export const {
useLazyCheckEmailQuery,
useGetInitializedQuery,
useSendLoginMagicLinkMutation,
useSendRegMagicLinkMutation,
+1
View File
@@ -8,6 +8,7 @@ const whiteList = [
"register",
"sendLoginMagicLink",
"sendRegMagicLink",
"checkEmail",
"checkMagicTokenValid",
"getGoogleAuthConfig",
"getGithubAuthConfig",