mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 17:25:44 +00:00
31 lines
840 B
JavaScript
31 lines
840 B
JavaScript
/*****************************************************************************
|
|
* Requests for /jobs routes *
|
|
*****************************************************************************/
|
|
nopaque.requests.jobs = {};
|
|
|
|
nopaque.requests.jobs.entity = {};
|
|
|
|
nopaque.requests.jobs.entity.delete = (jobId) => {
|
|
let input = `/jobs/${jobId}`;
|
|
let init = {
|
|
method: 'DELETE'
|
|
};
|
|
return nopaque.requests.JSONfetch(input, init);
|
|
};
|
|
|
|
nopaque.requests.jobs.entity.log = (jobId) => {
|
|
let input = `/jobs/${jobId}/log`;
|
|
let init = {
|
|
method: 'GET'
|
|
};
|
|
return nopaque.requests.JSONfetch(input, init);
|
|
};
|
|
|
|
nopaque.requests.jobs.entity.restart = (jobId) => {
|
|
let input = `/jobs/${jobId}/restart`;
|
|
let init = {
|
|
method: 'POST'
|
|
};
|
|
return nopaque.requests.JSONfetch(input, init);
|
|
};
|