Feature/admin allowed pkgs (#139)

* update admin endpoints to check if authorized to upload pkg

* add auth route for package to check in cli prior to upload

* fix param parsing

* remove uneeded log

* add case for when package is new

* move insert auth admin to pkg check

* send 200 response on successful insert

* invert logic

* retype AdminPkgs since PkgRecord id as key will not yet exist

* cleanup
This commit is contained in:
Lucy
2024-04-16 15:26:46 -04:00
committed by GitHub
parent 9af6e6dc76
commit 8834dd1d28
7 changed files with 141 additions and 42 deletions

View File

@@ -18,6 +18,7 @@
/package/#ApiVersion/version/#PkgId PkgVersionR GET -- get most recent appId version
-- ADMIN API V0
/admin/v0/auth/#PkgId CheckPkgAuthR POST !admin
/admin/v0/upload PkgUploadR POST !admin
/admin/v0/eos-upload EosUploadR POST !admin
/admin/v0/index PkgIndexR POST !admin