Fix bug where a reupload does not change the author or the description
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm 2020-07-31 23:58:36 +02:00
parent 085b3f5773
commit dce66274be

View File

@ -118,9 +118,6 @@ async function uploadPackage(ctx: ABC.Context) {
}; };
} }
packageMeta.author = meta.author;
packageMeta.description = meta.description;
const bucketBase = "packages/" + packageName + "/" + packageVersion + "/"; const bucketBase = "packages/" + packageName + "/" + packageVersion + "/";
console.log("Uploading files to S3"); console.log("Uploading files to S3");
@ -148,7 +145,11 @@ async function uploadPackage(ctx: ABC.Context) {
await db.package.update( await db.package.update(
{ name: packageName }, { name: packageName },
{ {
$set: { versions: [...packageMeta.versions, packageVersion] }, $set: {
versions: [...packageMeta.versions, packageVersion],
author: meta.author || packageMeta.author,
description: meta.description || packageMeta.description,
},
} }
); );