From dce66274beed8f9d91c204ca7c8d1af76c2d969d Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Fri, 31 Jul 2020 23:58:36 +0200 Subject: [PATCH] Fix bug where a reupload does not change the author or the description --- registry/src/http/api.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/registry/src/http/api.ts b/registry/src/http/api.ts index c1cbb84..365eff8 100644 --- a/registry/src/http/api.ts +++ b/registry/src/http/api.ts @@ -118,9 +118,6 @@ async function uploadPackage(ctx: ABC.Context) { }; } - packageMeta.author = meta.author; - packageMeta.description = meta.description; - const bucketBase = "packages/" + packageName + "/" + packageVersion + "/"; console.log("Uploading files to S3"); @@ -148,7 +145,11 @@ async function uploadPackage(ctx: ABC.Context) { await db.package.update( { name: packageName }, { - $set: { versions: [...packageMeta.versions, packageVersion] }, + $set: { + versions: [...packageMeta.versions, packageVersion], + author: meta.author || packageMeta.author, + description: meta.description || packageMeta.description, + }, } );