From cbb1d0f3cf1c13d499fd0839248e9e37da30d1ad Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Fri, 4 Mar 2022 11:18:06 -0300 Subject: [PATCH] Chore: Migrate REST API - forgotPassword to Typescript (#3818) --- app/definitions/rest/v1/users.ts | 3 +++ app/lib/rocketchat/services/restApi.ts | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/definitions/rest/v1/users.ts b/app/definitions/rest/v1/users.ts index 7bed1d145..251ff3ded 100644 --- a/app/definitions/rest/v1/users.ts +++ b/app/definitions/rest/v1/users.ts @@ -12,6 +12,9 @@ export type UsersEndpoints = { 'users.listTeams': { GET: (params: { userId: IUser['_id'] }) => { teams: Array }; }; + 'users.forgotPassword': { + POST: (params: { email: string }) => {}; + }; 'users.info': { GET: (params: { userId: IUser['_id'] }) => { user: IUser; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 560da66d7..40db3b020 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -67,10 +67,8 @@ export const register = (credentials: { name: string; email: string; pass: strin // RC 0.50.0 sdk.post('users.register', credentials); -export const forgotPassword = (email: string): any => +export const forgotPassword = (email: string) => // RC 0.64.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post('users.forgotPassword', { email }); export const sendConfirmationEmail = (email: string): Promise<{ message: string; success: boolean }> =>