Refactor(TS): Rename some file from *.tsx to *.ts

This commit is contained in:
2024-05-06 15:25:08 +08:00
parent ef653c20f8
commit 5e6c8f214c
8 changed files with 2 additions and 2 deletions

33
src/services/auth.ts Normal file
View File

@@ -0,0 +1,33 @@
import {
URL_FORGET,
URL_LOGIN,
URL_LOGOUT,
URL_REGISTER,
URL_RESEND,
URL_RETRIEVE,
URL_TWO_FACTOR,
URL_VERIFY
} from '@/constants/urls.constants'
import request from '@/services'
export const r_auth_register = (param: RegisterParam) => request.post<TokenVo>(URL_REGISTER, param)
export const r_auth_resend = () => request.post(URL_RESEND)
export const r_auth_verify = (param: VerifyParam) => request.post(URL_VERIFY, param)
export const r_auth_forget = (param: ForgetParam) => request.post(URL_FORGET, param)
export const r_auth_retrieve = (param: RetrieveParam) => request.post(URL_RETRIEVE, param)
export const r_auth_login = (param: LoginParam) => request.post<TokenVo>(URL_LOGIN, param)
export const r_auth_two_factor_create = () => request.get<TwoFactorVo>(URL_TWO_FACTOR)
export const r_auth_two_factor_validate = (param: TwoFactorValidateParam) =>
request.post(URL_TWO_FACTOR, param)
export const r_auth_two_factor_remove = (param: TwoFactorRemoveParam) =>
request.delete(URL_TWO_FACTOR, param)
export const r_auth_logout = () => request.post(URL_LOGOUT)