From 16c016e8b1d5ca46343d3363f9a49e24c5d7c944 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 May 2021 14:09:04 +0200 Subject: Stricter models typing --- server/models/user/user.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/models/user/user.ts') diff --git a/server/models/user/user.ts b/server/models/user/user.ts index 8d2564e54..20696b1f4 100644 --- a/server/models/user/user.ts +++ b/server/models/user/user.ts @@ -31,6 +31,7 @@ import { MUserWithNotificationSetting, MVideoWithRights } from '@server/types/models' +import { AttributesOnly } from '@shared/core-utils' import { hasUserRight, USER_ROLE_LABELS } from '../../../shared/core-utils/users' import { AbuseState, MyUser, UserRight, VideoPlaylistType, VideoPrivacy } from '../../../shared/models' import { User, UserRole } from '../../../shared/models/users' @@ -233,7 +234,7 @@ enum ScopeNames { } ] }) -export class UserModel extends Model { +export class UserModel extends Model>> { @AllowNull(true) @Is('UserPassword', value => throwIfNotValid(value, isUserPasswordValid, 'user password', true)) -- cgit v1.2.3