From 23bb9bc3d152d67345fb9af1cf70ef18502c92c6 Mon Sep 17 00:00:00 2001 From: Mir Arif Hasan Date: Mon, 6 Nov 2023 21:08:44 +0600 Subject: [PATCH] Revert "fix: handle invalid input for shortcode properties" This reverts commit 4dcb0afb184749068a11afbbb0087570d01df5d5. --- packages/hoppscotch-backend/src/shortcode/shortcode.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts b/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts index f5bfb075b..8c41a185c 100644 --- a/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts +++ b/packages/hoppscotch-backend/src/shortcode/shortcode.service.ts @@ -126,7 +126,7 @@ export class ShortcodeService implements UserDataHandler, OnModuleInit { return E.left(SHORTCODE_INVALID_REQUEST_JSON); const parsedProperties = stringToJson(properties); - if (E.isLeft(parsedProperties) || !parsedProperties.right) + if (E.isLeft(parsedProperties)) return E.left(SHORTCODE_INVALID_PROPERTIES_JSON); const generatedShortCode = await this.generateUniqueShortCodeID();