Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
c43873f3
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "8aac1f99d7af5873db7d23c07fba370d0f5061a6"
Unverified
Commit
c43873f3
authored
Oct 13, 2023
by
Bruce MacDonald
Committed by
GitHub
Oct 13, 2023
Browse files
check update response (#785)
parent
d790bf99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
app/src/index.ts
app/src/index.ts
+11
-2
No files found.
app/src/index.ts
View file @
c43873f3
...
@@ -168,17 +168,26 @@ async function isNewReleaseAvailable() {
...
@@ -168,17 +168,26 @@ async function isNewReleaseAvailable() {
try
{
try
{
const
response
=
await
fetch
(
'
https://ollama.ai/api/update
'
)
const
response
=
await
fetch
(
'
https://ollama.ai/api/update
'
)
if
(
!
response
.
ok
)
{
return
false
}
if
(
response
.
status
===
204
)
{
if
(
response
.
status
===
204
)
{
return
false
return
false
}
}
const
data
=
await
response
.
json
()
const
data
=
await
response
.
json
()
if
(
currentReleaseURL
===
data
.
url
)
{
const
url
=
data
?.
url
if
(
!
url
)
{
return
false
}
if
(
url
===
currentReleaseURL
)
{
return
false
return
false
}
}
currentReleaseURL
=
data
.
url
currentReleaseURL
=
url
return
true
return
true
}
catch
(
error
)
{
}
catch
(
error
)
{
logger
.
error
(
`update check failed -
${
error
}
`
)
logger
.
error
(
`update check failed -
${
error
}
`
)
...
...
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