Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Anything Llm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
Mintplex Labs
Anything Llm
Commits
a62e891f
Commit
a62e891f
authored
1 year ago
by
timothycarambat
Browse files
Options
Downloads
Patches
Plain Diff
force check api online via JSON response
parent
8af817e2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/models/system.js
+2
-1
2 additions, 1 deletion
frontend/src/models/system.js
frontend/src/utils/constants.js
+1
-2
1 addition, 2 deletions
frontend/src/utils/constants.js
server/endpoints/system.js
+1
-1
1 addition, 1 deletion
server/endpoints/system.js
with
4 additions
and
4 deletions
frontend/src/models/system.js
+
2
−
1
View file @
a62e891f
...
@@ -4,7 +4,8 @@ import { baseHeaders } from "../utils/request";
...
@@ -4,7 +4,8 @@ import { baseHeaders } from "../utils/request";
const
System
=
{
const
System
=
{
ping
:
async
function
()
{
ping
:
async
function
()
{
return
await
fetch
(
`
${
API_BASE
}
/ping`
)
return
await
fetch
(
`
${
API_BASE
}
/ping`
)
.
then
((
res
)
=>
res
.
ok
)
.
then
((
res
)
=>
res
.
json
())
.
then
((
res
)
=>
res
?.
online
||
false
)
.
catch
(()
=>
false
);
.
catch
(()
=>
false
);
},
},
totalIndexes
:
async
function
()
{
totalIndexes
:
async
function
()
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/utils/constants.js
+
1
−
2
View file @
a62e891f
export
const
API_BASE
=
export
const
API_BASE
=
import
.
meta
.
env
.
VITE_API_BASE
||
"
/api
"
;
import
.
meta
.
env
.
VITE_API_BASE
||
"
/api
"
;
export
const
AUTH_USER
=
"
anythingllm_user
"
;
export
const
AUTH_USER
=
"
anythingllm_user
"
;
export
const
AUTH_TOKEN
=
"
anythingllm_authToken
"
;
export
const
AUTH_TOKEN
=
"
anythingllm_authToken
"
;
This diff is collapsed.
Click to expand it.
server/endpoints/system.js
+
1
−
1
View file @
a62e891f
...
@@ -40,7 +40,7 @@ function systemEndpoints(app) {
...
@@ -40,7 +40,7 @@ function systemEndpoints(app) {
if
(
!
app
)
return
;
if
(
!
app
)
return
;
app
.
get
(
"
/ping
"
,
(
_
,
response
)
=>
{
app
.
get
(
"
/ping
"
,
(
_
,
response
)
=>
{
response
.
s
endS
tatus
(
200
);
response
.
status
(
200
)
.
json
({
online
:
true
})
;
});
});
app
.
get
(
"
/migrate
"
,
async
(
_
,
response
)
=>
{
app
.
get
(
"
/migrate
"
,
async
(
_
,
response
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment