feat: change api url
This commit is contained in:
parent
1489408b40
commit
1a17ce15aa
1
.env
1
.env
|
|
@ -1 +1,2 @@
|
|||
MEDOLS_CLIENT_KEY=bb65b1ad-e954-4a1a-b4d0-74df5bb0b640
|
||||
NEXT_PUBLIC_API_URL=http://localhost:8800
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
/** Qudo backend API base URL (set in `.env` as `NEXT_PUBLIC_API_URL`, e.g. `https://qudo.id/api` or `http://localhost:8800`). */
|
||||
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL ?? "";
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
import axios from "axios";
|
||||
|
||||
const baseURL = "https://qudo.id/api";
|
||||
import { API_BASE_URL } from "./api-base-url";
|
||||
|
||||
const axiosBaseInstance = axios.create({
|
||||
baseURL,
|
||||
baseURL: API_BASE_URL,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Client-Key": "9ca7f706-a8b0-4520-b467-5e8321df36fb",
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
import axios from "axios";
|
||||
import { postSignIn } from "../master-user";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const baseURL = "https://qudo.id/api";
|
||||
import { API_BASE_URL } from "./api-base-url";
|
||||
|
||||
const refreshToken = Cookies.get("refresh_token");
|
||||
|
||||
const axiosInterceptorInstance = axios.create({
|
||||
baseURL,
|
||||
baseURL: API_BASE_URL,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Client-Key": "9ca7f706-a8b0-4520-b467-5e8321df36fb",
|
||||
|
|
|
|||
Loading…
Reference in New Issue