diff --git a/apps/admin/services/common/auth.ts b/apps/admin/services/common/auth.ts index 483202c..9f51aa8 100644 --- a/apps/admin/services/common/auth.ts +++ b/apps/admin/services/common/auth.ts @@ -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('/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, diff --git a/apps/admin/services/common/typings.d.ts b/apps/admin/services/common/typings.d.ts index b111e8d..f4ae1dc 100644 --- a/apps/admin/services/common/typings.d.ts +++ b/apps/admin/services/common/typings.d.ts @@ -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; diff --git a/apps/user/services/common/auth.ts b/apps/user/services/common/auth.ts index 483202c..9f51aa8 100644 --- a/apps/user/services/common/auth.ts +++ b/apps/user/services/common/auth.ts @@ -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('/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, diff --git a/apps/user/services/common/typings.d.ts b/apps/user/services/common/typings.d.ts index b111e8d..f4ae1dc 100644 --- a/apps/user/services/common/typings.d.ts +++ b/apps/user/services/common/typings.d.ts @@ -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;