aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:36:03 +0200
commit690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3 (patch)
treeb16b8536acd2098aba8c1d6fe13a336dd6aa01a9 /server/models/user
parentbbd5aa7ead5f1554a0872963f957effc26d8c630 (diff)
downloadPeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.gz
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.tar.zst
PeerTube-690bb8f9f3413147a4f71d5ff0a3cd8170a94ce3.zip
Prefer using Object.values
Diffstat (limited to 'server/models/user')
-rw-r--r--server/models/user/user.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/models/user/user.ts b/server/models/user/user.ts
index 3fd359359..a2c2497fd 100644
--- a/server/models/user/user.ts
+++ b/server/models/user/user.ts
@@ -1,4 +1,3 @@
1import { values } from 'lodash'
2import { col, FindOptions, fn, literal, Op, QueryTypes, where, WhereOptions } from 'sequelize' 1import { col, FindOptions, fn, literal, Op, QueryTypes, where, WhereOptions } from 'sequelize'
3import { 2import {
4 AfterDestroy, 3 AfterDestroy,
@@ -283,7 +282,7 @@ export class UserModel extends Model<Partial<AttributesOnly<UserModel>>> {
283 282
284 @AllowNull(false) 283 @AllowNull(false)
285 @Is('UserNSFWPolicy', value => throwIfNotValid(value, isUserNSFWPolicyValid, 'NSFW policy')) 284 @Is('UserNSFWPolicy', value => throwIfNotValid(value, isUserNSFWPolicyValid, 'NSFW policy'))
286 @Column(DataType.ENUM(...values(NSFW_POLICY_TYPES))) 285 @Column(DataType.ENUM(...Object.values(NSFW_POLICY_TYPES)))
287 nsfwPolicy: NSFWPolicyType 286 nsfwPolicy: NSFWPolicyType
288 287
289 @AllowNull(false) 288 @AllowNull(false)