change api url
This commit is contained in:
@@ -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: "",
|
||||
};
|
||||
},
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user