mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 10:10:52 +00:00
chore: remove unnecessary go lines formatting
This commit is contained in:
parent
0b8d198b89
commit
a0f8dbd928
@ -357,11 +357,7 @@ func updateRepositoryProjectCount(ctx context.Context, repoID int64) error {
|
||||
}
|
||||
|
||||
// ChangeProjectStatusByRepoIDAndID toggles a project between opened and closed
|
||||
func ChangeProjectStatusByRepoIDAndID(
|
||||
ctx context.Context,
|
||||
repoID, projectID int64,
|
||||
isClosed bool,
|
||||
) error {
|
||||
func ChangeProjectStatusByRepoIDAndID(ctx context.Context, repoID, projectID int64, isClosed bool) error {
|
||||
ctx, committer, err := db.TxContext(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -402,11 +398,7 @@ func ChangeProjectStatus(ctx context.Context, p *Project, isClosed bool) error {
|
||||
func changeProjectStatus(ctx context.Context, p *Project, isClosed bool) error {
|
||||
p.IsClosed = isClosed
|
||||
p.ClosedDateUnix = timeutil.TimeStampNow()
|
||||
count, err := db.GetEngine(ctx).
|
||||
ID(p.ID).
|
||||
Where("repo_id = ? AND is_closed = ?", p.RepoID, !isClosed).
|
||||
Cols("is_closed", "closed_date_unix").
|
||||
Update(p)
|
||||
count, err := db.GetEngine(ctx).ID(p.ID).Where("repo_id = ? AND is_closed = ?", p.RepoID, !isClosed).Cols("is_closed", "closed_date_unix").Update(p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user