From 5f8b100f9efd9730e9d1061f37019b195d37d9b7 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Tue, 4 Aug 2020 18:00:57 +0200 Subject: [PATCH] feat: default cover --- src/controllers/PublicController.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/controllers/PublicController.ts b/src/controllers/PublicController.ts index 319e991..48c1f44 100644 --- a/src/controllers/PublicController.ts +++ b/src/controllers/PublicController.ts @@ -95,6 +95,11 @@ export default class PublicController { } else if (lastPublished === undefined || lastPublished === null) { return ErrorController.notFoundHandler()(req, res) } + + if (!Utils.isStrUsable(version, 'cover.location')) { + version.cover.location = "https://fva-condorcet.s3.fr-par.scw.cloud/rrQC0FP.png" + } + // if (lastPublished !== null) { // lastPublished = lastPublished // }