mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
remove not used code
Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
092c46d18e
commit
9207a4e7bf
@ -217,19 +217,6 @@ func GetBoard(ctx context.Context, boardID int64) (*Board, error) {
|
|||||||
return board, nil
|
return board, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetBoard fetches the current default board of a project
|
|
||||||
func GetDefaultBoard(ctx context.Context, projectID int64) (*Board, error) {
|
|
||||||
board := new(Board)
|
|
||||||
has, err := db.GetEngine(ctx).Where("project_id = ? AND `default` = ?", projectID, true).Get(board)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
} else if !has {
|
|
||||||
return nil, ErrProjectBoardNotExist{BoardID: -1}
|
|
||||||
}
|
|
||||||
|
|
||||||
return board, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateBoard updates a project board
|
// UpdateBoard updates a project board
|
||||||
func UpdateBoard(ctx context.Context, board *Board) error {
|
func UpdateBoard(ctx context.Context, board *Board) error {
|
||||||
var fieldToUpdate []string
|
var fieldToUpdate []string
|
||||||
|
@ -69,11 +69,6 @@ func (issue *ProjectIssue) LoadProjectBoard(ctx context.Context) error {
|
|||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
if issue.ProjectBoardID == 0 {
|
|
||||||
issue.ProjectBoard, err = GetDefaultBoard(ctx, issue.ProjectID)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
issue.ProjectBoard, err = GetBoard(ctx, issue.ProjectBoardID)
|
issue.ProjectBoard, err = GetBoard(ctx, issue.ProjectBoardID)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user