From c4124af73adf5811eba82fe7d6331496eac72428 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Thu, 10 Mar 2022 09:37:54 -0300 Subject: [PATCH] Chore: Migrate REST API - resetAvatar to Typescript (#3870) --- 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 0a9644965..17b0e1e8e 100644 --- a/app/definitions/rest/v1/users.ts +++ b/app/definitions/rest/v1/users.ts @@ -43,6 +43,9 @@ export type UsersEndpoints = { user: IUser; }; }; + 'users.resetAvatar': { + POST: (params: { userId: string }) => {}; + }; 'users.getPreferences': { GET: (params: { userId: IUser['_id'] }) => { preferences: INotificationPreferences; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 268f2140c..d5c212d90 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -570,10 +570,8 @@ export const getAvatarSuggestion = (): Promise => // RC 0.51.0 sdk.methodCallWrapper('getAvatarSuggestion'); -export const resetAvatar = (userId: string): any => +export const resetAvatar = (userId: string) => // RC 0.55.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post('users.resetAvatar', { userId }); export const setAvatarFromService = ({