mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 07:21:31 +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
|
// ChangeProjectStatusByRepoIDAndID toggles a project between opened and closed
|
||||||
func ChangeProjectStatusByRepoIDAndID(
|
func ChangeProjectStatusByRepoIDAndID(ctx context.Context, repoID, projectID int64, isClosed bool) error {
|
||||||
ctx context.Context,
|
|
||||||
repoID, projectID int64,
|
|
||||||
isClosed bool,
|
|
||||||
) error {
|
|
||||||
ctx, committer, err := db.TxContext(ctx)
|
ctx, committer, err := db.TxContext(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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 {
|
func changeProjectStatus(ctx context.Context, p *Project, isClosed bool) error {
|
||||||
p.IsClosed = isClosed
|
p.IsClosed = isClosed
|
||||||
p.ClosedDateUnix = timeutil.TimeStampNow()
|
p.ClosedDateUnix = timeutil.TimeStampNow()
|
||||||
count, err := db.GetEngine(ctx).
|
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)
|
||||||
ID(p.ID).
|
|
||||||
Where("repo_id = ? AND is_closed = ?", p.RepoID, !isClosed).
|
|
||||||
Cols("is_closed", "closed_date_unix").
|
|
||||||
Update(p)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user