mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-02 09:17:10 +02:00
Simplify project board API: use state field, extract helpers, remove dead code
- Replace separate POST /close and /reopen endpoints with a state field on EditProjectOption, matching the milestone and issue API patterns - Extract getRepoProjectByID and getRepoProjectColumn helpers to deduplicate repeated lookup-and-error-handle patterns - Use LoadIssueNumbersForProject (singular) for single-project handlers - Remove unnecessary LoadIssueNumbersForProjects call on CreateProject since a new project always has zero issues - Remove unnecessary WHAT comments - Fix copyright year in routers/api/v1/repo/project.go Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
This commit is contained in:
@@ -49,6 +49,8 @@ type EditProjectOption struct {
|
||||
Description *string `json:"description,omitempty"`
|
||||
// Card type: 0=text_only, 1=images_and_text
|
||||
CardType *int `json:"card_type,omitempty"`
|
||||
// State of the project (open or closed)
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
// ProjectColumn represents a project column (board)
|
||||
|
||||
Reference in New Issue
Block a user