From e9a9c20fb5e6c48f52f28c6b5b665f7b73ca3b9f Mon Sep 17 00:00:00 2001 From: kandrusyak Date: Tue, 20 Dec 2022 21:01:10 +0300 Subject: [PATCH] change api url --- server.js | 2 +- src/components/LoggedInLayout.vue | 2 +- src/pages/login/TheLogin.vue | 6 +++--- src/shared/fetchWrapper.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index e9284ac..64da363 100644 --- a/server.js +++ b/server.js @@ -717,7 +717,7 @@ export function clientsServer() { }, ], })); - this.passthrough("http://45.84.227.122:8080/**"); + this.passthrough("https://astra-dev.dopcore.com/**"); this.get("/api/detail/:id", (schema, request) => { let id = request.params.id; return clientDetail.find((el) => el.person_id === id); diff --git a/src/components/LoggedInLayout.vue b/src/components/LoggedInLayout.vue index 92c6116..37a8641 100644 --- a/src/components/LoggedInLayout.vue +++ b/src/components/LoggedInLayout.vue @@ -33,7 +33,7 @@ export default { return { isOpenForm: false, updatedClients: false, - url: "http://45.84.227.122:8080", + url: "https://astra-dev.dopcore.com", createdClientId: "", }; }, diff --git a/src/pages/login/TheLogin.vue b/src/pages/login/TheLogin.vue index 56e82f1..a079a85 100644 --- a/src/pages/login/TheLogin.vue +++ b/src/pages/login/TheLogin.vue @@ -85,14 +85,14 @@ export default { localStorage.password = this.user.password; }, async auth(token) { - let res = await fetch("http://45.84.227.122:8080/auth/users/me/", { + let res = await fetch("https://astra-dev.dopcore.com/auth/users/me/", { headers: { Authorization: `Bearer ${token}`, }, }); res = await res.json(); let data = await fetch( - `http://45.84.227.122:8080/accounts/users/${res.id}/detail`, + `https://astra-dev.dopcore.com/accounts/users/${res.id}/detail`, { headers: { Authorization: `Bearer ${token}`, @@ -109,7 +109,7 @@ export default { headers: { "Content-Type": "application/json" }, body: JSON.stringify(this.user), }; - fetch("http://45.84.227.122:8080/auth/jwt/create/", requestOptions) + fetch("https://astra-dev.dopcore.com/auth/jwt/create/", requestOptions) .then((result) => { if (result.status === 200) { return result.json(); diff --git a/src/shared/fetchWrapper.js b/src/shared/fetchWrapper.js index 588913b..fc3ac0d 100644 --- a/src/shared/fetchWrapper.js +++ b/src/shared/fetchWrapper.js @@ -2,7 +2,7 @@ import router from "@/router"; function prepareUrl(url) { if (url.startsWith("http")) return url; - return `http://45.84.227.122:8080/api/${url}`; + return `https://astra-dev.dopcore.com/api/${url}`; } function handleRequest(method, url, headers, attempts, body, type) {