1 import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
2 import { sendUndoCacheFile } from './activitypub/send'
3 import { Transaction } from 'sequelize'
4 import { getServerActor } from '../helpers/utils'
6 async function removeVideoRedundancy (videoRedundancy: VideoRedundancyModel, t?: Transaction) {
7 const serverActor = await getServerActor()
9 await sendUndoCacheFile(serverActor, videoRedundancy, t)
11 await videoRedundancy.destroy({ transaction: t })
14 // ---------------------------------------------------------------------------