update api runs url (plural fix)

This commit is contained in:
Simone Gotti 2019-04-08 16:12:08 +02:00
parent cdf478ca66
commit a0097ea16e
2 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ export default {
return "unknown";
},
async restartRun(run, fromStart) {
let res = await fetch(apiurl("/run/" + run.id + "/actions"), {
let res = await fetch(apiurl("/runs/" + run.id + "/actions"), {
method: "PUT",
body: JSON.stringify({
action_type: "restart",
@ -147,7 +147,7 @@ export default {
throw Error(res.statusText);
},
async stopRun(run) {
let res = fetch(apiurl("/run/" + run.id + "/actions"), {
let res = fetch(apiurl("/runs/" + run.id + "/actions"), {
method: "PUT",
body: JSON.stringify({
action_type: "stop"

View File

@ -19,12 +19,12 @@ export async function fetchRuns(group, lastrun) {
}
export async function fetchRun(runid) {
let res = await fetch(apiurl("/run/" + runid));
let res = await fetch(apiurl("/runs/" + runid));
return res.json();
}
export async function fetchTask(runid, taskid) {
let res = await fetch(apiurl("/run/" + runid + "/task/" + taskid))
let res = await fetch(apiurl("/runs/" + runid + "/tasks/" + taskid))
return res.json();
}