forked from kevadesu/forgejo
Update
This commit is contained in:
parent
aa64f6515c
commit
4568ebc913
4 changed files with 51 additions and 25 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue