From 829523cfa5177a1810d9373f9a25bf3b18138d1e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Mar 2021 10:55:09 +0100 Subject: Reduce bundle size using a const enum --- server/helpers/custom-validators/user-notifications.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/helpers') diff --git a/server/helpers/custom-validators/user-notifications.ts b/server/helpers/custom-validators/user-notifications.ts index 8a33b895b..252c107db 100644 --- a/server/helpers/custom-validators/user-notifications.ts +++ b/server/helpers/custom-validators/user-notifications.ts @@ -1,10 +1,9 @@ -import { exists } from './misc' import validator from 'validator' -import { UserNotificationType } from '../../../shared/models/users' import { UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' +import { exists } from './misc' function isUserNotificationTypeValid (value: any) { - return exists(value) && validator.isInt('' + value) && UserNotificationType[value] !== undefined + return exists(value) && validator.isInt('' + value) } function isUserNotificationSettingValid (value: any) { -- cgit v1.2.3