mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-08 09:44:00 +09: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:
@ -184,7 +184,7 @@ func ForkRepository(ctx context.Context, doer, owner *user_model.User, opts Fork
|
||||
// ConvertForkToNormalRepository convert the provided repo from a forked repo to normal repo
|
||||
func ConvertForkToNormalRepository(repo *repo_model.Repository) error {
|
||||
err := db.WithTx(db.DefaultContext, func(ctx context.Context) error {
|
||||
repo, err := repo_model.GetRepositoryByIDCtx(ctx, repo.ID)
|
||||
repo, err := repo_model.GetRepositoryByID(ctx, repo.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user