diff options
author | techknowlogick <techknowlogick@gitea.io> | 2023-03-14 03:45:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 03:45:21 -0400 |
commit | 03591f0f95823a0b1dcca969d2a3ed505c7e6d73 (patch) | |
tree | 0117b3cf1f27b4f0f7a0346fcf724fa3af0e3f8f /services/agit | |
parent | aac07d010f261c00fb3bd9644c71dc108c668c11 (diff) | |
download | gitea-03591f0f95823a0b1dcca969d2a3ed505c7e6d73.tar.gz gitea-03591f0f95823a0b1dcca969d2a3ed505c7e6d73.zip |
add user rename endpoint to admin api (#22789)
this is a simple endpoint that adds the ability to rename users to the
admin API.
Note: this is not in a mergeable state. It would be better if this was
handled by a PATCH/POST to the /api/v1/admin/users/{username} endpoint
and the username is modified.
---------
Co-authored-by: Jason Song <i@wolfogre.com>
Diffstat (limited to 'services/agit')
-rw-r--r-- | services/agit/agit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/agit/agit.go b/services/agit/agit.go index b61cb6f3f5..32fc3cba4a 100644 --- a/services/agit/agit.go +++ b/services/agit/agit.go @@ -226,8 +226,8 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git. } // UserNameChanged handle user name change for agit flow pull -func UserNameChanged(user *user_model.User, newName string) error { - pulls, err := issues_model.GetAllUnmergedAgitPullRequestByPoster(user.ID) +func UserNameChanged(ctx context.Context, user *user_model.User, newName string) error { + pulls, err := issues_model.GetAllUnmergedAgitPullRequestByPoster(ctx, user.ID) if err != nil { return err } |