chore: merge from main branch

This commit is contained in:
Tristan Yang
2022-06-21 16:48:29 +08:00
11 changed files with 142 additions and 94 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
@@ -135,6 +135,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" })
}),
@@ -164,6 +169,7 @@ export const authApi = createApi({
});
export const {
useLazyCheckEmailQuery,
useGetInitializedQuery,
useSendLoginMagicLinkMutation,
useSendRegMagicLinkMutation,
+1
View File
@@ -9,6 +9,7 @@ const whiteList = [
"register",
"sendLoginMagicLink",
"sendRegMagicLink",
"checkEmail",
"checkMagicTokenValid",
"getGoogleAuthConfig",
"getGithubAuthConfig",