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
2ddc20aa
Commit
2ddc20aa
authored
Jun 26, 2023
by
熊洋洋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix deploy
parent
7643b1c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
client/api/index.ts
client/api/index.ts
+8
-3
No files found.
client/api/index.ts
View file @
2ddc20aa
...
...
@@ -9,14 +9,19 @@ export const backendApi = axios.create({
});
(()
=>
{
axios
.
get
((
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
||
'
http://localhost:3001
'
)
+
"
/schema/all
"
).
then
(
if
(
!
sessionStorage
.
getItem
(
"
baseURL
"
))
{
const
url
=
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
||
'
http://localhost:3001
'
axios
.
get
((
url
)
+
"
/schema/all
"
).
then
(
()
=>
{
set
(
backendApi
.
defaults
,
"
baseURL
"
,
process
.
env
.
NEXT_PUBLIC_BACKEND_URL
)
set
(
backendApi
.
defaults
,
"
baseURL
"
,
url
)
sessionStorage
.
setItem
(
"
baseURL
"
,
url
)
},
err
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
sessionStorage
.
setItem
(
"
baseURL
"
,
'
/backend
'
)
}
);
}
})();
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