setDefaultPagination,
userHistoryRemoveValidator
} from '../../../middlewares'
-import { UserModel } from '../../../models/account/user'
import { getFormattedObjects } from '../../../helpers/utils'
import { UserVideoHistoryModel } from '../../../models/account/user-video-history'
import { sequelizeTypescript } from '../../../initializers'
const beforeDate = req.body.beforeDate || null
await sequelizeTypescript.transaction(t => {
- return UserVideoHistoryModel.removeHistoryBefore(user, beforeDate, t)
+ return UserVideoHistoryModel.removeUserHistoryBefore(user, beforeDate, t)
})
// Do not send the delete to other instances, we delete OUR copy of this video abuse