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
dc642aa0
Commit
dc642aa0
authored
Jul 25, 2023
by
Jeffrey Morgan
Browse files
web: skip pre-releases
parent
f1ff892f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
web/app/api/update/route.ts
web/app/api/update/route.ts
+3
-2
No files found.
web/app/api/update/route.ts
View file @
dc642aa0
...
...
@@ -14,11 +14,12 @@ export async function GET(req: Request) {
const
res
=
await
fetch
(
'
https://api.github.com/repos/jmorganca/ollama/releases
'
,
{
next
:
{
revalidate
:
60
}
})
const
data
=
await
res
.
json
()
if
(
data
.
length
===
0
)
{
const
latest
=
data
?.
filter
((
f
:
any
)
=>
!
f
.
prerelease
)?.[
0
]
if
(
!
latest
)
{
return
new
Response
(
'
not found
'
,
{
status
:
404
})
}
const
latest
=
data
[
0
]
const
assets
=
latest
.
assets
||
[]
if
(
assets
.
length
===
0
)
{
...
...
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