import { literal, Op, QueryTypes, Transaction } from 'sequelize'
import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
-import { AttributesOnly } from '@shared/core-utils'
+import { AttributesOnly } from '@shared/typescript-utils'
import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
import { MActorDefault } from '../../types/models'
transaction: t
}
- return VideoShareModel.findAndCountAll(query)
+ return Promise.all([
+ VideoShareModel.count(query),
+ VideoShareModel.findAll(query)
+ ]).then(([ total, data ]) => ({ total, data }))
}
static listRemoteShareUrlsOfLocalVideos () {