]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix tests
authorChocobozzz <me@florianbigard.com>
Thu, 9 Sep 2021 07:55:20 +0000 (09:55 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 9 Sep 2021 07:55:20 +0000 (09:55 +0200)
shared/extra-utils/videos/videos-command.ts

index 63980c147d1f4f48c7964552254346c266b30193..99f56a34c0ca7675e6f4f089f65bc2cfae223553 100644 (file)
@@ -449,7 +449,9 @@ export class VideosCommand extends AbstractCommand {
 
       const result = await this.sendResumableChunks({ ...options, pathUploadId, videoFilePath, size })
 
-      await this.endResumableUpload({ ...options, pathUploadId })
+      if (result.statusCode === HttpStatusCode.OK_200) {
+        await this.endResumableUpload({ ...options, expectedStatus: HttpStatusCode.NO_CONTENT_204, pathUploadId })
+      }
 
       return result.body?.video || result.body as any
     }