From 06c4dbaaeb43f645e17012121035fdb6755aa0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20R=C3=B6ssel?= <65733898+FreshImmuc@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:00:18 +0000 Subject: [PATCH] Updated to match Discord's new IDs --- .../src/controllers/connectors/plugins/discordBot.class.ts | 3 ++- packages/backend/src/docs/rest-api.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/controllers/connectors/plugins/discordBot.class.ts b/packages/backend/src/controllers/connectors/plugins/discordBot.class.ts index c77ea0fb..04acd267 100644 --- a/packages/backend/src/controllers/connectors/plugins/discordBot.class.ts +++ b/packages/backend/src/controllers/connectors/plugins/discordBot.class.ts @@ -15,7 +15,7 @@ export class DiscordBotConnectorPlugin extends ConnectorPlugin { private isReady = false; private static readonly socketSchema = object({ - channel: string().alphanum().length(18).when(ref('$isRequired'), { + channel: string().alphanum().min(18).max(19).when(ref('$isRequired'), { is: boolean().invalid(false), then: required(), }), @@ -25,6 +25,7 @@ export class DiscordBotConnectorPlugin extends ConnectorPlugin { }), }).required(); + /** * Creates an instance of DiscordBotConnectorPlugin. * diff --git a/packages/backend/src/docs/rest-api.json b/packages/backend/src/docs/rest-api.json index 09679e1a..3a0fdaf6 100644 --- a/packages/backend/src/docs/rest-api.json +++ b/packages/backend/src/docs/rest-api.json @@ -437,7 +437,7 @@ "userId": { "type": "string", "minLength": 18, - "maxLength": 18, + "maxLength": 19, "example": "123456789123456789" }, "createdAt": { @@ -546,7 +546,7 @@ "required": true, "type": "string", "minLength": 18, - "maxLength": 18 + "maxLength": 19 } ], "responses": {