mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-10-27 06:30:37 +00:00
rework jobs package 1/2
This commit is contained in:
1 parent
5f27ce2801
commit
d6fcaa97bf
10 files changed
+134
-94
No files matched your search
@@ -1,4 +1,4 @@
|
||||
Requests = {};
|
||||
let Requests = {};
|
||||
|
||||
Requests.JSONfetch = (input, init={}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*****************************************************************************
|
||||
* Jobs *
|
||||
* Fetch requests for /jobs routes *
|
||||
*****************************************************************************/
|
||||
Requests.jobs = {};
|
||||
|
||||
Requests.jobs.entity = {};
|
||||
|
||||
Requests.jobs.entity.delete = (jobId) => {
|
||||
let input = `/jobs/${jobId}`;
|
||||
let init = {
|
||||
method: 'DELETE'
|
||||
};
|
||||
return Requests.JSONfetch(input, init);
|
||||
}
|
||||
|
||||
Requests.jobs.entity.log = (jobId) => {
|
||||
let input = `/jobs/${jobId}/log`;
|
||||
let init = {
|
||||
method: 'GET'
|
||||
};
|
||||
return Requests.JSONfetch(input, init);
|
||||
}
|
||||
Reference in new issue
Block a user