mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
8698458f48
commit
0a7d3ff786
145 changed files with 360 additions and 369 deletions
|
@ -338,7 +338,7 @@ func DeleteProjectByIDCtx(ctx context.Context, id int64) error {
|
|||
return updateRepositoryProjectCount(ctx, p.RepoID)
|
||||
}
|
||||
|
||||
func DeleteProjectByRepoIDCtx(ctx context.Context, repoID int64) error {
|
||||
func DeleteProjectByRepoID(ctx context.Context, repoID int64) error {
|
||||
switch {
|
||||
case setting.Database.UseSQLite3:
|
||||
if _, err := db.GetEngine(ctx).Exec("DELETE FROM project_issue WHERE project_issue.id IN (SELECT project_issue.id FROM project_issue INNER JOIN project WHERE project.id = project_issue.project_id AND project.repo_id = ?)", repoID); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue