api for actions (#1031)

* implementation of GET and DELETE for Job Queue API

* implement POST jobs submission to queue via API

* implement GET /queue/backends API endpoint to get backend names
This commit is contained in:
Oliver Gorwits
2023-04-27 16:26:26 +01:00
committed by GitHub
parent e268b9d522
commit 0a1f1bcb73
5 changed files with 238 additions and 3 deletions

View File

@@ -202,8 +202,8 @@ get '/logout' => sub {
redirect uri_for(setting('web_home'))->path;
};
# user redirected here (POST -> GET) when login fails
get qr{^/(?:login(?:/denied)?)?} => sub {
# user redirected here when require_role does not succeed
any qr{^/(?:login(?:/denied)?)?} => sub {
my $api = ((request->accept and request->accept =~ m/(?:json|javascript)/) ? true : false);
if ($api) {