UPDATE: fix buyg+
This commit is contained in:
+3
-4
@@ -2,8 +2,7 @@ import api from "@/config/config";
|
||||
import { API } from "../../api";
|
||||
import { clearStoredTokens, extractTokensFromResponsePayload, setStoredTokens } from "@/auth/tokenStore";
|
||||
|
||||
export const apiCreateOTP = async (email: string) => {
|
||||
const token_type = 2;
|
||||
export const apiCreateOTP = async (email: string, token_type: number = 2) => {
|
||||
const response = await api.post(API.Auth.CREATEOTP, {
|
||||
email,
|
||||
token_type
|
||||
@@ -11,8 +10,8 @@ export const apiCreateOTP = async (email: string) => {
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const apiVerifyOTP = async (email: string, token: string) => {
|
||||
const body = { email, token, token_type: 2 };
|
||||
export const apiVerifyOTP = async (email: string, token: string, token_type: number = 2) => {
|
||||
const body = { email, token, token_type };
|
||||
const response = await api.post(API.Auth.VERIFYOTP, body);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user