]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/user-notification-setting.ts
Type toFormattedJSON
[github/Chocobozzz/PeerTube.git] / server / models / account / user-notification-setting.ts
index c2fbc6d23cc150b673bd9d02d524ef345718529f..1506295cf7f7183ad9e6b2c29fac9bb32e86fd9d 100644 (file)
@@ -17,6 +17,7 @@ import { UserModel } from './user'
 import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
 import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
 import { clearCacheByUserId } from '../../lib/oauth-model'
+import { MNotificationSettingFormattable } from '@server/typings/models'
 
 @Table({
   tableName: 'userNotificationSetting',
@@ -152,7 +153,7 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM
     return clearCacheByUserId(instance.userId)
   }
 
-  toFormattedJSON (): UserNotificationSetting {
+  toFormattedJSON (this: MNotificationSettingFormattable): UserNotificationSetting {
     return {
       newCommentOnMyVideo: this.newCommentOnMyVideo,
       newVideoFromSubscription: this.newVideoFromSubscription,