Skip to content

Commit a221f30

Browse files
committed
docs: add changeset for room mute/unmute user migrations
1 parent 03b6340 commit a221f30

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": minor
3+
"@rocket.chat/rest-typings": minor
4+
---
5+
6+
Migrated `rooms.muteUser` and `rooms.unmuteUser` endpoints to the new OpenAPI pattern with AJV schema validation

apps/meteor/app/api/server/v1/rooms.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ export const roomEndpoints = API.v1
12411241
authRequired: true,
12421242
body: isRoomsMuteUnmuteUserProps,
12431243
response: {
1244-
200: ajv.compile<{ success: true }>({
1244+
200: ajv.compile<void>({
12451245
type: 'object',
12461246
properties: {
12471247
success: { type: 'boolean', enum: [true] },
@@ -1262,7 +1262,7 @@ export const roomEndpoints = API.v1
12621262

12631263
await muteUserInRoom(this.userId, { rid: this.bodyParams.roomId, username: user.username });
12641264

1265-
return API.v1.success({ success: true });
1265+
return API.v1.success();
12661266
},
12671267
)
12681268
.post(
@@ -1271,7 +1271,7 @@ export const roomEndpoints = API.v1
12711271
authRequired: true,
12721272
body: isRoomsMuteUnmuteUserProps,
12731273
response: {
1274-
200: ajv.compile<{ success: true }>({
1274+
200: ajv.compile<void>({
12751275
type: 'object',
12761276
properties: {
12771277
success: { type: 'boolean', enum: [true] },
@@ -1292,7 +1292,7 @@ export const roomEndpoints = API.v1
12921292

12931293
await unmuteUserInRoom(this.userId, { rid: this.bodyParams.roomId, username: user.username });
12941294

1295-
return API.v1.success({ success: true });
1295+
return API.v1.success();
12961296
},
12971297
);
12981298

0 commit comments

Comments
 (0)