aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/redundancy.ts')
-rw-r--r--server/lib/redundancy.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/lib/redundancy.ts b/server/lib/redundancy.ts
new file mode 100644
index 000000000..78221cc3d
--- /dev/null
+++ b/server/lib/redundancy.ts
@@ -0,0 +1,18 @@
1import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
2import { sendUndoCacheFile } from './activitypub/send'
3import { Transaction } from 'sequelize'
4import { getServerActor } from '../helpers/utils'
5
6async function removeVideoRedundancy (videoRedundancy: VideoRedundancyModel, t?: Transaction) {
7 const serverActor = await getServerActor()
8
9 await sendUndoCacheFile(serverActor, videoRedundancy, t)
10
11 await videoRedundancy.destroy({ transaction: t })
12}
13
14// ---------------------------------------------------------------------------
15
16export {
17 removeVideoRedundancy
18}