]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/tag.ts
Support live session in server
[github/Chocobozzz/PeerTube.git] / server / models / video / tag.ts
index d04205703b7a12b1121a38e571b09cfebc9f6504..7900e070dd8a0dfa4205859b20fb081fc1dc49ed 100644 (file)
@@ -1,6 +1,7 @@
 import { col, fn, QueryTypes, Transaction } from 'sequelize'
 import { AllowNull, BelongsToMany, Column, CreatedAt, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
 import { MTag } from '@server/types/models'
+import { AttributesOnly } from '@shared/typescript-utils'
 import { VideoPrivacy, VideoState } from '../../../shared/models/videos'
 import { isVideoTagValid } from '../../helpers/custom-validators/videos'
 import { throwIfNotValid } from '../utils'
@@ -17,11 +18,11 @@ import { VideoTagModel } from './video-tag'
     },
     {
       name: 'tag_lower_name',
-      fields: [ fn('lower', col('name')) ] as any // FIXME: typings
+      fields: [ fn('lower', col('name')) ]
     }
   ]
 })
-export class TagModel extends Model {
+export class TagModel extends Model<Partial<AttributesOnly<TagModel>>> {
 
   @AllowNull(false)
   @Is('VideoTag', value => throwIfNotValid(value, isVideoTagValid, 'tag'))