Resend OTP (#34)

* feat: responsive

* fix: success register

* feat: auth login responsive && auth login implementation

* fix: login page button disabled & register page

* fix: conflict

* fix: button disabled when loading

* feat: register and otp integration

* Update middleware.ts

* feat: OTP Resend
This commit is contained in:
Naufal Azmi
2025-06-18 18:50:06 +07:00
committed by GitHub
parent 2c347d1cc5
commit b7282f9c99
8 changed files with 104 additions and 5 deletions
+13 -1
View File
@@ -3,6 +3,7 @@ import {
TLoginRequest,
TLoginResponse,
TRegisterRequest,
TSendOTPRequest,
TVerifyEmailRequest,
} from '../../types/auth';
import { TResponseMessage } from '../../types/common';
@@ -35,7 +36,18 @@ export const postVerifyEmail = async (
const { data } = await api({
method: 'POST',
url: '/auth/verify-email',
data: { otp: parseInt(payload.otp), email: payload.email },
data: {otp: parseInt(payload.otp), email: payload.email},
});
return data;
};
export const postSendOtp = async (
payload: TSendOTPRequest
): Promise<TResponseMessage> => {
const { data } = await api({
method: 'POST',
url: '/auth/send-otp',
data: payload,
});
return data;
};