import { AttributesOnly } from '@shared/typescript-utils'
import { VideoModel } from '../video/video'
import { UserModel } from './user'
-import { getServerActor } from '../application/application'
@Table({
tableName: 'userVideoHistory',
})
}
+ static removeUserHistoryElement (user: MUserId, videoId: number) {
+ const query: DestroyOptions = {
+ where: {
+ userId: user.id,
+ videoId
+ }
+ }
+
+ return UserVideoHistoryModel.destroy(query)
+ }
+
static removeUserHistoryBefore (user: MUserId, beforeDate: string, t: Transaction) {
const query: DestroyOptions = {
where: {