1
0
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:
a1012112796 2024-04-23 10:11:38 +00:00
parent 092c46d18e
commit 9207a4e7bf
No known key found for this signature in database
GPG Key ID: E5FB19032C2C2A64
2 changed files with 0 additions and 18 deletions

View File

@ -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

View File

@ -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
} }