mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
Fix API-Endpoint release (#3012)
* Fixes API-Endpoint release (#3005) * Using context.ReferencesGitRepo(); doing the same in the PATCH route. * Add release create, get and update test
This commit is contained in:
parent
cc0c4a30a7
commit
695b10bedd
3 changed files with 91 additions and 3 deletions
|
@ -463,9 +463,9 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
})
|
||||
m.Group("/releases", func() {
|
||||
m.Combo("").Get(repo.ListReleases).
|
||||
Post(reqToken(), reqRepoWriter(), bind(api.CreateReleaseOption{}), repo.CreateRelease)
|
||||
Post(reqToken(), reqRepoWriter(), context.ReferencesGitRepo(), bind(api.CreateReleaseOption{}), repo.CreateRelease)
|
||||
m.Combo("/:id").Get(repo.GetRelease).
|
||||
Patch(reqToken(), reqRepoWriter(), bind(api.EditReleaseOption{}), repo.EditRelease).
|
||||
Patch(reqToken(), reqRepoWriter(), context.ReferencesGitRepo(), bind(api.EditReleaseOption{}), repo.EditRelease).
|
||||
Delete(reqToken(), reqRepoWriter(), repo.DeleteRelease)
|
||||
})
|
||||
m.Post("/mirror-sync", reqToken(), reqRepoWriter(), repo.MirrorSync)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue