mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-18 23:45:26 +02:00
current stand
This commit is contained in:
parent
83be5c4cfe
commit
ccdaf12ee3
27
src/apis/change-allow-email-login-from-different-devices.ts
Normal file
27
src/apis/change-allow-email-login-from-different-devices.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import {SimpleDetailResponse} from "~/server-types"
|
||||
import {client} from "~/constants/axios-client"
|
||||
|
||||
export interface ChangeAllowEmailLoginFromDifferentDevicesData {
|
||||
email: string
|
||||
sameRequestToken: string
|
||||
allow: boolean
|
||||
}
|
||||
|
||||
export default async function changeAllowEmailLoginFromDifferentDevices({
|
||||
email,
|
||||
sameRequestToken,
|
||||
allow,
|
||||
}: ChangeAllowEmailLoginFromDifferentDevicesData): Promise<SimpleDetailResponse> {
|
||||
const {data} = await client.patch(
|
||||
`${
|
||||
import.meta.env.VITE_SERVER_BASE_URL
|
||||
}/auth/login/email-token/allow-email-login-from-different-devices`,
|
||||
{
|
||||
email,
|
||||
sameRequestToken,
|
||||
allow,
|
||||
},
|
||||
)
|
||||
|
||||
return data
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user