forked from forgejo/forgejo
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>
This commit is contained in:
parent
aac07d010f
commit
03591f0f95
12 changed files with 206 additions and 44 deletions
|
@ -660,10 +660,10 @@ func GetPullRequestByIssueID(ctx context.Context, issueID int64) (*PullRequest,
|
|||
|
||||
// GetAllUnmergedAgitPullRequestByPoster get all unmerged agit flow pull request
|
||||
// By poster id.
|
||||
func GetAllUnmergedAgitPullRequestByPoster(uid int64) ([]*PullRequest, error) {
|
||||
func GetAllUnmergedAgitPullRequestByPoster(ctx context.Context, uid int64) ([]*PullRequest, error) {
|
||||
pulls := make([]*PullRequest, 0, 10)
|
||||
|
||||
err := db.GetEngine(db.DefaultContext).
|
||||
err := db.GetEngine(ctx).
|
||||
Where("has_merged=? AND flow = ? AND issue.is_closed=? AND issue.poster_id=?",
|
||||
false, PullRequestFlowAGit, false, uid).
|
||||
Join("INNER", "issue", "issue.id=pull_request.issue_id").
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue