X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fuser%2Fuser.ts;h=20696b1f49fb04d0ed8e9f1ae1186c91d6ff6272;hb=5ec3cbdf22fc88ebe57f370fc0bc0e3df7453458;hp=8d2564e54626b9fed988ab3f774a81046a566f07;hpb=7d9ba5c08999c6482f0bc5e0c09c6f55b7724090;p=github%2FChocobozzz%2FPeerTube.git 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))