X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fuser-notifications.ts;h=252c107db762c319cbbcdf057e447f51b30feb75;hb=4024c44f9027a32809931de0692d40d001df721c;hp=8a33b895bc0508ea3cb7953d38360e50f8981516;hpb=338eb9d33af690db716805fd2277bf68f473b58f;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) {