diff options
author | zeripath <art27@cantab.net> | 2021-04-06 20:44:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 20:44:05 +0100 |
commit | fa3895ce81ba64689fbf76b91d96963541547881 (patch) | |
tree | d7fe6c24429ccbb1d55b53441cefb34799dee993 /routers/repo/pull.go | |
parent | 8be2cc4fc72e7985640dabdddb06cf78169c1882 (diff) | |
download | gitea-fa3895ce81ba64689fbf76b91d96963541547881.tar.gz gitea-fa3895ce81ba64689fbf76b91d96963541547881.zip |
Move modules/forms to services/forms (#15305)
Forms are dependent on models and therefore should be in services.
This PR also removes the old auth. aliasing
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/repo/pull.go')
-rw-r--r-- | routers/repo/pull.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go index 0002263013..32d11a285b 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -18,7 +18,6 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" - auth "code.gitea.io/gitea/modules/forms" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" @@ -30,6 +29,7 @@ import ( "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/modules/web/middleware" "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/gitdiff" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" @@ -172,7 +172,7 @@ func Fork(ctx *context.Context) { // ForkPost response for forking a repository func ForkPost(ctx *context.Context) { - form := web.GetForm(ctx).(*auth.CreateRepoForm) + form := web.GetForm(ctx).(*forms.CreateRepoForm) ctx.Data["Title"] = ctx.Tr("new_fork") ctxUser := checkContextUser(ctx, form.UID) @@ -764,7 +764,7 @@ func UpdatePullRequest(ctx *context.Context) { // MergePullRequest response for merging pull request func MergePullRequest(ctx *context.Context) { - form := web.GetForm(ctx).(*auth.MergePullRequestForm) + form := web.GetForm(ctx).(*forms.MergePullRequestForm) issue := checkPullInfo(ctx) if ctx.Written() { return @@ -975,7 +975,7 @@ func stopTimerIfAvailable(user *models.User, issue *models.Issue) error { // CompareAndPullRequestPost response for creating pull request func CompareAndPullRequestPost(ctx *context.Context) { - form := web.GetForm(ctx).(*auth.CreateIssueForm) + form := web.GetForm(ctx).(*forms.CreateIssueForm) ctx.Data["Title"] = ctx.Tr("repo.pulls.compare_changes") ctx.Data["PageIsComparePull"] = true ctx.Data["IsDiffCompare"] = true |