From 9c2fd53bdd33bc3c12fbb7173db460b49db93909 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Tue, 30 Apr 2024 15:36:53 -0400 Subject: [PATCH] server: remove deprecated `permissions` field from `GET /api/room/:room` endpoint --- client/src/components/RoomSettingsForm.vue | 10 +--------- common/models/rest-api.ts | 2 -- docs/api.yaml | 8 +------- server/api/room.ts | 1 - 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/client/src/components/RoomSettingsForm.vue b/client/src/components/RoomSettingsForm.vue index 320e3e63e..a51fbd5f5 100644 --- a/client/src/components/RoomSettingsForm.vue +++ b/client/src/components/RoomSettingsForm.vue @@ -186,15 +186,7 @@ onMounted(async () => { function intoSettings(obj: OttApiResponseGetRoom): RoomSettings { return { - ..._.omit(obj, [ - "name", - "isTemporary", - "users", - "queue", - "permissions", - "hasOwner", - "grants", - ]), + ..._.omit(obj, ["name", "isTemporary", "users", "queue", "hasOwner", "grants"]), grants: new Grants(obj.grants), }; } diff --git a/common/models/rest-api.ts b/common/models/rest-api.ts index 37d901b5e..e4c2109a1 100644 --- a/common/models/rest-api.ts +++ b/common/models/rest-api.ts @@ -62,8 +62,6 @@ export interface OttApiResponseGetRoom extends RoomSettings { hasOwner: boolean; grants: Grants; autoSkipSegmentCategories: Category[]; - /** @deprecated */ - permissions: Grants; restoreQueueBehavior: BehaviorOption; users: RoomUserInfo[]; } diff --git a/docs/api.yaml b/docs/api.yaml index e0e8356ec..54b7e79cf 100644 --- a/docs/api.yaml +++ b/docs/api.yaml @@ -136,12 +136,6 @@ paths: queue: type: array items: {} - permissions: - type: array - items: - type: array - items: - type: number name: type: string isTemporary: @@ -200,7 +194,7 @@ paths: $ref: "#/components/schemas/visibility" queueMode: $ref: "#/components/schemas/queuemode" - autoSkipSegmentCategories: + autoSkipSegmentCategories: $ref: "#/components/schemas/autoSkipSegmentCategories" grants: description: Map of role numbers to the bitmask of permissions that role has diff --git a/server/api/room.ts b/server/api/room.ts index c4169e09c..5670ed1f4 100644 --- a/server/api/room.ts +++ b/server/api/room.ts @@ -182,7 +182,6 @@ const getRoom: RequestHandler<{ name: string }, OttApiResponseGetRoom, unknown> ]) ), queue: room.queue.items, - permissions: room.grants, hasOwner: !!room.owner, }; res.json(resp);