🐛 fix(auth): Remove unused telephone code login function and update typings for telephone login requests

This commit is contained in:
web@ppanel 2025-01-15 22:49:40 +07:00
parent 7b6bb7bc69
commit 72396851ff
4 changed files with 6 additions and 44 deletions

View File

@ -62,21 +62,6 @@ export async function telephoneLogin(
});
}
/** User Telephone login POST /v1/auth/login/telephone/code */
export async function telephoneCodeLogin(
body: API.TelephoneCodeLoginRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: API.LoginResponse }>('/v1/auth/login/telephone/code', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** User register POST /v1/auth/register */
export async function userRegister(
body: API.UserRegisterRequest,

View File

@ -277,6 +277,7 @@ declare namespace API {
};
type SendCodeResponse = {
code?: string;
status: boolean;
};
@ -425,15 +426,9 @@ declare namespace API {
exist: boolean;
};
type TelephoneCodeLoginRequest = {
telephone: string;
telephone_area_code: string;
telephone_code: string;
cf_token?: string;
};
type TelephoneLoginRequest = {
telephone: string;
telephone_code: string;
telephone_area_code: string;
password: string;
cf_token?: string;
@ -450,6 +445,7 @@ declare namespace API {
type TelephoneResetPasswordRequest = {
telephone: string;
telephone_area_code: string;
password: string;
code?: string;
cf_token?: string;

View File

@ -62,21 +62,6 @@ export async function telephoneLogin(
});
}
/** User Telephone login POST /v1/auth/login/telephone/code */
export async function telephoneCodeLogin(
body: API.TelephoneCodeLoginRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: API.LoginResponse }>('/v1/auth/login/telephone/code', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** User register POST /v1/auth/register */
export async function userRegister(
body: API.UserRegisterRequest,

View File

@ -277,6 +277,7 @@ declare namespace API {
};
type SendCodeResponse = {
code?: string;
status: boolean;
};
@ -425,15 +426,9 @@ declare namespace API {
exist: boolean;
};
type TelephoneCodeLoginRequest = {
telephone: string;
telephone_area_code: string;
telephone_code: string;
cf_token?: string;
};
type TelephoneLoginRequest = {
telephone: string;
telephone_code: string;
telephone_area_code: string;
password: string;
cf_token?: string;
@ -450,6 +445,7 @@ declare namespace API {
type TelephoneResetPasswordRequest = {
telephone: string;
telephone_area_code: string;
password: string;
code?: string;
cf_token?: string;