aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/user-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-08 11:26:41 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-01-09 11:15:15 +0100
commit2f1548fda32c3ba9e53913270394eedfacd55986 (patch)
treeafee28df36a9e00f921603d9091e5d08d5818159 /server/helpers/custom-validators/user-notifications.ts
parentf7cc67b455a12ccae9b0ea16876d166720364357 (diff)
downloadPeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.tar.gz
PeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.tar.zst
PeerTube-2f1548fda32c3ba9e53913270394eedfacd55986.zip
Add notifications in the client
Diffstat (limited to 'server/helpers/custom-validators/user-notifications.ts')
-rw-r--r--server/helpers/custom-validators/user-notifications.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/user-notifications.ts b/server/helpers/custom-validators/user-notifications.ts
index 4fb5d922d..02ea3bbc2 100644
--- a/server/helpers/custom-validators/user-notifications.ts
+++ b/server/helpers/custom-validators/user-notifications.ts
@@ -9,8 +9,12 @@ function isUserNotificationTypeValid (value: any) {
9 9
10function isUserNotificationSettingValid (value: any) { 10function isUserNotificationSettingValid (value: any) {
11 return exists(value) && 11 return exists(value) &&
12 validator.isInt('' + value) && 12 validator.isInt('' + value) && (
13 UserNotificationSettingValue[ value ] !== undefined 13 value === UserNotificationSettingValue.NONE ||
14 value === UserNotificationSettingValue.WEB ||
15 value === UserNotificationSettingValue.EMAIL ||
16 value === (UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL)
17 )
14} 18}
15 19
16export { 20export {