]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/user/user-notification-setting.ts
Stricter models typing
[github/Chocobozzz/PeerTube.git] / server / models / user / user-notification-setting.ts
index 138051528d6f493da896a79773d37294f56c2093..bee7d7851583a8bc8ea08178a7ec510e8f286e4d 100644 (file)
@@ -14,6 +14,7 @@ import {
 } from 'sequelize-typescript'
 import { TokensCache } from '@server/lib/auth/tokens-cache'
 import { MNotificationSettingFormattable } from '@server/types/models'
+import { AttributesOnly } from '@shared/core-utils'
 import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
 import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
 import { throwIfNotValid } from '../utils'
@@ -28,7 +29,7 @@ import { UserModel } from './user'
     }
   ]
 })
-export class UserNotificationSettingModel extends Model {
+export class UserNotificationSettingModel extends Model<Partial<AttributesOnly<UserNotificationSettingModel>>> {
 
   @AllowNull(false)
   @Default(null)