]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Translated using Weblate (Swedish)
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index ec51c66bfb81b9080f42963308c165af44c4a5fd..e27625bc862c8a20504b0e12c0224d9539c598b3 100644 (file)
@@ -1,5 +1,4 @@
-import { literal, Op, OrderItem } from 'sequelize'
-import { Model, Sequelize } from 'sequelize-typescript'
+import { literal, Op, OrderItem, Sequelize } from 'sequelize'
 import { Col } from 'sequelize/types/lib/utils'
 import validator from 'validator'
 
@@ -195,11 +194,11 @@ function parseAggregateResult (result: any) {
   return total
 }
 
-const createSafeIn = (model: typeof Model, stringArr: (string | number)[]) => {
+function createSafeIn (sequelize: Sequelize, stringArr: (string | number)[]) {
   return stringArr.map(t => {
     return t === null
       ? null
-      : model.sequelize.escape('' + t)
+      : sequelize.escape('' + t)
   }).join(', ')
 }