UPDATE: fix buyg+

This commit is contained in:
2026-05-08 11:17:17 +07:00
parent ce4bc4f2a5
commit 6f163c3730
4 changed files with 9 additions and 8 deletions
+3 -4
View File
@@ -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;
};