current stand

This commit is contained in:
Myzel394 2022-11-04 19:40:29 +01:00
parent 83be5c4cfe
commit ccdaf12ee3

View 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
}