rework jobs package 1/2

This commit is contained in:
Inga Kirschnick
2023-03-09 14:55:52 +01:00
parent 5f27ce2801
commit d6fcaa97bf
10 changed files with 134 additions and 94 deletions

View File

@ -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);
}