refactor(web): some small cleanup

This commit is contained in:
Jef Roosens 2022-08-13 17:49:05 +02:00
parent e23635a1d3
commit 9268ef0302
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 20 additions and 19 deletions

View file

@ -8,7 +8,7 @@ import web.response { new_response }
['/:repo/:arch/:pkg'; delete]
fn (mut app App) delete_package(repo string, arch string, pkg string) web.Result {
if !app.is_authorized() {
return app.json(http.Status.unauthorized, new_response('Unauthorized.'))
return app.json(.unauthorized, new_response('Unauthorized.'))
}
res := app.repo.remove_pkg_from_arch_repo(repo, arch, pkg, true) or {