From a0097ea16ed59a486e12a3f572f23dd07333e248 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Mon, 8 Apr 2019 16:12:08 +0200 Subject: [PATCH] update api runs url (plural fix) --- src/components/rundetail.vue | 4 ++-- src/util/data.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/rundetail.vue b/src/components/rundetail.vue index ed58a11..41612c6 100644 --- a/src/components/rundetail.vue +++ b/src/components/rundetail.vue @@ -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" diff --git a/src/util/data.js b/src/util/data.js index bb1ec94..acb1033 100644 --- a/src/util/data.js +++ b/src/util/data.js @@ -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(); }