Skip to content

Commit

Permalink
Chore: Migrate REST API - resetAvatar to Typescript (#3870)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinaldonetof authored Mar 10, 2022
1 parent 5d28453 commit c4124af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/definitions/rest/v1/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export type UsersEndpoints = {
user: IUser;
};
};
'users.resetAvatar': {
POST: (params: { userId: string }) => {};
};
'users.getPreferences': {
GET: (params: { userId: IUser['_id'] }) => {
preferences: INotificationPreferences;
Expand Down
4 changes: 1 addition & 3 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,8 @@ export const getAvatarSuggestion = (): Promise<IAvatarSuggestion> =>
// 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 = ({
Expand Down

0 comments on commit c4124af

Please sign in to comment.