This commit is contained in:
JakobDev 2024-12-18 22:33:22 +01:00
parent aa64f6515c
commit 4568ebc913
No known key found for this signature in database
GPG key ID: 39DEF62C3ED6DC4C
4 changed files with 51 additions and 25 deletions

View file

@ -494,7 +494,7 @@ func DrawIssueSummaryCard(ctx *context.Context) {
}
func DrawReleaseSummaryCard(ctx *context.Context) {
release, err := repo_model.GetReleaseForRepoByID(ctx, ctx.Repo.Repository.ID, ctx.ParamsInt64(":releaseID"))
release, err := repo_model.GetRelease(ctx, ctx.Repo.Repository.ID, ctx.Params("*"))
if err != nil {
if repo_model.IsErrReleaseNotExist(err) {
ctx.NotFound("", nil)

View file

@ -1299,7 +1299,7 @@ func registerRoutes(m *web.Route) {
m.Get("/latest", repo.LatestRelease)
m.Get(".rss", feedEnabled, repo.ReleasesFeedRSS)
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
m.Get("/summary-card/{releaseID}", repo.DrawReleaseSummaryCard)
m.Get("/summary-card/*", repo.DrawReleaseSummaryCard)
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, true))
m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, repo.GetAttachment)