fix: missing params on `updateOwnBasicInfo` endpoint (#30156)

pull/30349/head^2
Douglas Fabris 2 years ago committed by GitHub
parent afd2b0d974
commit 93d4912e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .changeset/wise-walls-tan.md
  2. 2
      apps/meteor/app/api/server/v1/users.ts
  3. 16
      packages/rest-typings/src/v1/users.ts
  4. 10
      packages/rest-typings/src/v1/users/UsersUpdateOwnBasicInfoParamsPOST.ts

@ -0,0 +1,6 @@
---
'@rocket.chat/rest-typings': minor
'@rocket.chat/meteor': minor
---
fix: missing params on updateOwnBasicInfo endpoint

@ -126,7 +126,9 @@ API.v1.addRoute(
realname: this.bodyParams.data.name,
username: this.bodyParams.data.username,
nickname: this.bodyParams.data.nickname,
bio: this.bodyParams.data.bio,
statusText: this.bodyParams.data.statusText,
statusType: this.bodyParams.data.statusType,
newPassword: this.bodyParams.data.newPassword,
typedPassword: this.bodyParams.data.currentPassword,
};

@ -9,7 +9,6 @@ import type {
} from '@rocket.chat/core-typings';
import Ajv from 'ajv';
import type { UsersSendConfirmationEmailParamsPOST } from '..';
import type { PaginatedRequest } from '../helpers/PaginatedRequest';
import type { PaginatedResult } from '../helpers/PaginatedResult';
import type { UserCreateParamsPOST } from './users/UserCreateParamsPOST';
@ -20,7 +19,9 @@ import type { UserSetActiveStatusParamsPOST } from './users/UserSetActiveStatusP
import type { UsersAutocompleteParamsGET } from './users/UsersAutocompleteParamsGET';
import type { UsersInfoParamsGet } from './users/UsersInfoParamsGet';
import type { UsersListTeamsParamsGET } from './users/UsersListTeamsParamsGET';
import type { UsersSendConfirmationEmailParamsPOST } from './users/UsersSendConfirmationEmailParamsPOST';
import type { UsersSetPreferencesParamsPOST } from './users/UsersSetPreferenceParamsPOST';
import type { UsersUpdateOwnBasicInfoParamsPOST } from './users/UsersUpdateOwnBasicInfoParamsPOST';
import type { UsersUpdateParamsPOST } from './users/UsersUpdateParamsPOST';
const ajv = new Ajv({
@ -358,18 +359,7 @@ export type UsersEndpoints = {
};
'/v1/users.updateOwnBasicInfo': {
POST: (params: {
data: {
email?: string;
name?: string;
username?: string;
nickname?: string;
statusText?: string;
newPassword?: string;
currentPassword?: string;
};
customFields?: Record<string, unknown>;
}) => {
POST: (params: UsersUpdateOwnBasicInfoParamsPOST) => {
user: IUser;
};
};

@ -10,7 +10,9 @@ export type UsersUpdateOwnBasicInfoParamsPOST = {
name?: string;
username?: string;
nickname?: string;
bio?: string;
statusText?: string;
statusType?: string;
currentPassword?: string;
newPassword?: string;
};
@ -39,6 +41,14 @@ const UsersUpdateOwnBasicInfoParamsPostSchema = {
type: 'string',
nullable: true,
},
bio: {
type: 'string',
nullable: true,
},
statusType: {
type: 'string',
nullable: true,
},
statusText: {
type: 'string',
nullable: true,

Loading…
Cancel
Save