send 200 response on successful insert

This commit is contained in:
Lucy Cifferello
2024-04-16 10:27:26 -04:00
parent a9d78fa490
commit e9fa0857e5

View File

@@ -167,7 +167,9 @@ postCheckPkgAuthR pkgId = do
then sendResponseText status200 "User authorized to upload this package."
else if authorized && newPkg
-- if pkg is whitelisted and a new upload, add as authorized for this admin user
then runDB $ insert_ (AdminPkgs (AdminKey name) (PkgRecordKey pkgId))
then do
runDB $ insert_ (AdminPkgs (AdminKey name) (PkgRecordKey pkgId))
sendResponseText status200 "User authorized to upload this package."
else sendResponseText status401 "User not authorized to upload this package."
else sendResponseText status500 "Package does not belong on this registry."