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