chore: Re-formatted code

This commit is contained in:
cclvi256 2024-12-19 22:43:52 +08:00
parent de5a83a685
commit 1097739cb2
No known key found for this signature in database
1 changed files with 4 additions and 4 deletions

View File

@ -380,11 +380,11 @@ func GetLatestRun(ctx context.Context, repoID int64) (*ActionRun, error) {
func GetRunsBeforeDate(ctx context.Context, repoID int64, beforeDate time.Time) ([]*ActionRun, error) { func GetRunsBeforeDate(ctx context.Context, repoID int64, beforeDate time.Time) ([]*ActionRun, error) {
var runs []*ActionRun var runs []*ActionRun
err := db.GetEngine(ctx). err := db.GetEngine(ctx).
Where("repo_id = ?", repoID). Where("repo_id = ?", repoID).
And("created < ?", beforeDate). And("created < ?", beforeDate).
Find(&runs) Find(&runs)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return runs, nil return runs, nil
} }