mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-20 16:25:26 +02:00
24 lines
421 B
TypeScript
24 lines
421 B
TypeScript
import axios from "axios"
|
|
|
|
import {AuthenticationDetails} from "~/types"
|
|
|
|
export interface ValidateEmailData {
|
|
email: string
|
|
token: string
|
|
}
|
|
|
|
export default async function validateEmail({
|
|
email,
|
|
token,
|
|
}: ValidateEmailData): Promise<AuthenticationDetails> {
|
|
const {data} = await axios.post(
|
|
`${import.meta.env.VITE_SERVER_BASE_URL}/auth/verify-email`,
|
|
{
|
|
email: email,
|
|
token: token,
|
|
},
|
|
)
|
|
|
|
return data
|
|
}
|