diff options
author | HampusM <hampus@hampusmat.com> | 2021-05-24 13:30:42 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-05-24 13:30:42 +0200 |
commit | 0c23beadccfda6c6e2d6380244fbe49f5bfee139 (patch) | |
tree | 6e0d8654a0097427808d2f5deba530b6a9e8294d /src | |
parent | 6ae79f6bd3f7eaeae0d707889ce8d2c1c32c3ba9 (diff) |
API calls uses window.location
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/components/HomeHeader.vue | 2 | ||||
-rw-r--r-- | src/frontend/components/RepositoryHeader.vue | 2 | ||||
-rw-r--r-- | src/frontend/views/Home.vue | 2 | ||||
-rw-r--r-- | src/frontend/views/RepositoryCommit.vue | 2 | ||||
-rw-r--r-- | src/frontend/views/RepositoryLog.vue | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend/components/HomeHeader.vue b/src/frontend/components/HomeHeader.vue index f0366a3..8c27c93 100644 --- a/src/frontend/components/HomeHeader.vue +++ b/src/frontend/components/HomeHeader.vue @@ -22,7 +22,7 @@ export default { watch(() => { - fetch(`http://localhost:1337/api/v1/info`) + fetch(`${window.location.protocol}//${window.location.host}/api/v1/info`) .then((res) => res.json()) .then((data) => { diff --git a/src/frontend/components/RepositoryHeader.vue b/src/frontend/components/RepositoryHeader.vue index b0db4f9..b074d15 100644 --- a/src/frontend/components/RepositoryHeader.vue +++ b/src/frontend/components/RepositoryHeader.vue @@ -33,7 +33,7 @@ export default { watch(() => { - fetch(`http://localhost:1337/api/v1/repos/${props.repository}`) + fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos/${props.repository}`) .then((res) => res.json()) .then((data) => { diff --git a/src/frontend/views/Home.vue b/src/frontend/views/Home.vue index 79ec4ab..9ee5c02 100644 --- a/src/frontend/views/Home.vue +++ b/src/frontend/views/Home.vue @@ -47,7 +47,7 @@ export default { watch(() => { - fetch(`http://localhost:1337/api/v1/repos`) + fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos`) .then((res) => res.json()) .then((data) => state.projects = data["data"]); }); diff --git a/src/frontend/views/RepositoryCommit.vue b/src/frontend/views/RepositoryCommit.vue index 283ed69..9554de7 100644 --- a/src/frontend/views/RepositoryCommit.vue +++ b/src/frontend/views/RepositoryCommit.vue @@ -80,7 +80,7 @@ export default { watch(() => { - fetch(`http://localhost:1337/api/v1/repos/${props.repository}/log/${props.commit}`) + fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos/${props.repository}/log/${props.commit}`) .then((res) => res.json()) .then((data) => { diff --git a/src/frontend/views/RepositoryLog.vue b/src/frontend/views/RepositoryLog.vue index 399fc78..42a9780 100644 --- a/src/frontend/views/RepositoryLog.vue +++ b/src/frontend/views/RepositoryLog.vue @@ -75,7 +75,7 @@ export default { watch(() => { - fetch(`http://localhost:1337/api/v1/repos/${props.repository}/log`) + fetch(`${window.location.protocol}//${window.location.host}/api/v1/repos/${props.repository}/log`) .then((res) => res.json()) .then((data) => { state.commits = data["data"]; |