env
This commit is contained in:
parent
4c08945944
commit
90b48e710f
@ -1,7 +1,9 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { autoRefresh } from '../utils/utils';
|
import { autoRefresh } from '../utils/utils';
|
||||||
|
import {env} from '$env/dynamic/private';
|
||||||
|
|
||||||
export const authInstance = axios.create({
|
export const authInstance = axios.create({
|
||||||
baseURL: `${process.env.API_BASE}`,
|
baseURL: `${env.API_BASE}`,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { parse, stringify } from 'qs'
|
import { parse, stringify } from 'qs'
|
||||||
import { autoRefresh } from '../utils/utils';
|
import { autoRefresh } from '../utils/utils';
|
||||||
|
import {env} from '$env/dynamic/private';
|
||||||
export const exoInstance = axios.create({
|
export const exoInstance = axios.create({
|
||||||
paramsSerializer:{encode:(params)=> {return parse(params, {arrayFormat:"brackets"})}, serialize: (p)=>{return stringify(p, {arrayFormat: "repeat"})}},
|
paramsSerializer:{encode:(params)=> {return parse(params, {arrayFormat:"brackets"})}, serialize: (p)=>{return stringify(p, {arrayFormat: "repeat"})}},
|
||||||
baseURL: `${process.env.API_BASE}`,
|
baseURL: `${env.API_BASE}`,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { autoRefresh } from '../utils/utils';
|
import { autoRefresh } from '../utils/utils';
|
||||||
|
import {env} from '$env/dynamic/private';
|
||||||
|
|
||||||
export const roomInstance = axios.create({
|
export const roomInstance = axios.create({
|
||||||
baseURL: `${process.env.API_BASE}/room`,
|
baseURL: `${env.API_BASE}/room`,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
|
Loading…
Reference in New Issue
Block a user