server: Fix shadowed fields in becca entities

This commit is contained in:
Elian Doran
2024-07-24 20:39:50 +03:00
parent 709101c540
commit bb19cc216b
8 changed files with 6 additions and 15 deletions

View File

@@ -64,6 +64,10 @@ function getRevision(req: Request) {
function getRevisionFilename(revision: BRevision) {
let filename = utils.formatDownloadTitle(revision.title, revision.type, revision.mime);
if (!revision.dateCreated) {
throw new Error("Missing creation date for revision.");
}
const extension = path.extname(filename);
const date = revision.dateCreated
.substr(0, 19)