mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-30 13:14:19 +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);
|
|
};
|