change api url
This commit is contained in:
@@ -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) => {
|
this.get("/api/detail/:id", (schema, request) => {
|
||||||
let id = request.params.id;
|
let id = request.params.id;
|
||||||
return clientDetail.find((el) => el.person_id === id);
|
return clientDetail.find((el) => el.person_id === id);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isOpenForm: false,
|
isOpenForm: false,
|
||||||
updatedClients: false,
|
updatedClients: false,
|
||||||
url: "http://45.84.227.122:8080",
|
url: "https://astra-dev.dopcore.com",
|
||||||
createdClientId: "",
|
createdClientId: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -85,14 +85,14 @@ export default {
|
|||||||
localStorage.password = this.user.password;
|
localStorage.password = this.user.password;
|
||||||
},
|
},
|
||||||
async auth(token) {
|
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: {
|
headers: {
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
res = await res.json();
|
res = await res.json();
|
||||||
let data = await fetch(
|
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: {
|
headers: {
|
||||||
Authorization: `Bearer ${token}`,
|
Authorization: `Bearer ${token}`,
|
||||||
@@ -109,7 +109,7 @@ export default {
|
|||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(this.user),
|
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) => {
|
.then((result) => {
|
||||||
if (result.status === 200) {
|
if (result.status === 200) {
|
||||||
return result.json();
|
return result.json();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import router from "@/router";
|
|||||||
|
|
||||||
function prepareUrl(url) {
|
function prepareUrl(url) {
|
||||||
if (url.startsWith("http")) return 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) {
|
function handleRequest(method, url, headers, attempts, body, type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user