X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fuser-notifications.ts;h=252c107db762c319cbbcdf057e447f51b30feb75;hb=92e66e04f7f51d37b465cff442ce47f6d6d7cadd;hp=8a33b895bc0508ea3cb7953d38360e50f8981516;hpb=7024e9120b381b5b3201212f5a18f5cdc14e15ff;p=github%2FChocobozzz%2FPeerTube.git 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) {