From 72396851ffa65fb7b715611586547fba0bc73b6a Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Wed, 15 Jan 2025 22:49:40 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(auth):=20Remove=20unused=20t?= =?UTF-8?q?elephone=20code=20login=20function=20and=20update=20typings=20f?= =?UTF-8?q?or=20telephone=20login=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/services/common/auth.ts | 15 --------------- apps/admin/services/common/typings.d.ts | 10 +++------- apps/user/services/common/auth.ts | 15 --------------- apps/user/services/common/typings.d.ts | 10 +++------- 4 files changed, 6 insertions(+), 44 deletions(-) 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;