mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
#3290 better code structure and batch minor improvements
This commit is contained in:
parent
2eeb0ec9b0
commit
e7fd65f0cf
10 changed files with 196 additions and 228 deletions
|
@ -244,7 +244,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
m.Group("/:index", func() {
|
||||
m.Combo("").Get(repo.GetIssue).Patch(bind(api.EditIssueOption{}), repo.EditIssue)
|
||||
m.Group("/labels", func() {
|
||||
m.Combo("").Get(repo.GetIssueLabels).
|
||||
m.Combo("").Get(repo.ListIssueLabels).
|
||||
Post(bind(api.IssueLabelsOption{}), repo.AddIssueLabels).
|
||||
Put(bind(api.IssueLabelsOption{}), repo.ReplaceIssueLabels).
|
||||
Delete(repo.ClearIssueLabels)
|
||||
|
@ -255,8 +255,8 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
})
|
||||
m.Group("/labels", func() {
|
||||
m.Combo("").Get(repo.ListLabels).
|
||||
Post(bind(api.LabelOption{}), repo.CreateLabel)
|
||||
m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.LabelOption{}), repo.EditLabel).
|
||||
Post(bind(api.CreateLabelOption{}), repo.CreateLabel)
|
||||
m.Combo("/:id").Get(repo.GetLabel).Patch(bind(api.EditLabelOption{}), repo.EditLabel).
|
||||
Delete(repo.DeleteLabel)
|
||||
})
|
||||
}, RepoAssignment())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue