X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Ftag.ts;h=0c0757fc809265152633e6e31da95aa3513e1bda;hb=571389d43b8fc8aaf27e77c06f19b320b08dbbc9;hp=d0d8353d7999607482d2a522009a0590e5703ac8;hpb=6fcd19ba737f1f5614a56c6925adb882dea43b8d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/tag.ts b/server/models/video/tag.ts index d0d8353d7..0c0757fc8 100644 --- a/server/models/video/tag.ts +++ b/server/models/video/tag.ts @@ -47,14 +47,14 @@ function associate (models) { Tag.belongsToMany(models.Video, { foreignKey: 'tagId', through: models.VideoTag, - onDelete: 'cascade' + onDelete: 'CASCADE' }) } findOrCreateTags = function (tags: string[], transaction: Sequelize.Transaction) { const tasks: Promise[] = [] tags.forEach(tag => { - const query: any = { + const query: Sequelize.FindOrInitializeOptions = { where: { name: tag },