1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add migrations

This commit is contained in:
Chocobozzz 2019-04-24 10:28:57 +02:00
parent 2fb5b3a55a
commit 9cc8d43e37
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 70 additions and 17 deletions

View file

@ -108,7 +108,10 @@ async function processUndoCacheFile (byActor: ActorModel, activity: ActivityUndo
return sequelizeTypescript.transaction(async t => {
const cacheFile = await VideoRedundancyModel.loadByUrl(cacheFileObject.id)
if (!cacheFile) throw new Error('Unknown video cache ' + cacheFileObject.id)
if (!cacheFile) {
logger.debug('Cannot undo unknown video cache %s.', cacheFileObject.id)
return
}
if (cacheFile.actorId !== byActor.id) throw new Error('Cannot delete redundancy ' + cacheFile.url + ' of another actor.')