mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 09:21:15 +00:00
feat: Add Search to Releases Page
This commit is contained in:
parent
e5e2860221
commit
86546fe63e
7 changed files with 69 additions and 3 deletions
|
@ -136,6 +136,10 @@ func ListReleases(ctx *context.APIContext) {
|
|||
// in: query
|
||||
// description: filter (exclude / include) pre-releases
|
||||
// type: boolean
|
||||
// - name: q
|
||||
// in: query
|
||||
// description: Search string
|
||||
// type: string
|
||||
// - name: page
|
||||
// in: query
|
||||
// description: page number of results to return (1-based)
|
||||
|
@ -158,6 +162,7 @@ func ListReleases(ctx *context.APIContext) {
|
|||
IsDraft: ctx.FormOptionalBool("draft"),
|
||||
IsPreRelease: ctx.FormOptionalBool("pre-release"),
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
Keyword: ctx.FormTrim("q"),
|
||||
}
|
||||
|
||||
releases, err := db.Find[repo_model.Release](ctx, opts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue