Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chat-query
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
jaden
chat-query
Commits
7643b1c9
Commit
7643b1c9
authored
Jun 26, 2023
by
熊洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix deploy
parent
d2b7ef58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
client/api/index.ts
client/api/index.ts
+15
-4
No files found.
client/api/index.ts
View file @
7643b1c9
"
use client
"
'
use client
'
;
import
{
set
}
from
'
lodash
'
;
import
axios
from
'
redaxios
'
;
const
APi
=
axios
.
create
({
});
const
APi
=
axios
.
create
({});
export
const
backendApi
=
axios
.
create
({
"
baseURL
"
:
globalThis
?.
location
?.
protocol
===
'
https:
'
?
'
/backend
'
:
(
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
||
"
http://localhost:3001
"
)
baseURL
:
'
/backend
'
,
});
(()
=>
{
axios
.
get
((
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
||
'
http://localhost:3001
'
)
+
"
/schema/all
"
).
then
(
()
=>
{
set
(
backendApi
.
defaults
,
"
baseURL
"
,
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
)
},
err
=>
{
console
.
log
(
err
);
}
);
})();
export
default
APi
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment