summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/projects.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-12-30 04:56:12 +0100
committerGitHub <noreply@github.com>2021-12-30 11:56:12 +0800
commit658a636afe045d1ccf909ebf09ea6b1122e310f5 (patch)
treeed31ff4fea494264b49f13e758b549e77dc0959c /routers/web/repo/projects.go
parentccb79785384254881c152b3b4ef00c3c262937d6 (diff)
downloadgitea-658a636afe045d1ccf909ebf09ea6b1122e310f5.tar.gz
gitea-658a636afe045d1ccf909ebf09ea6b1122e310f5.zip
Removed unused method. (#18129)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/repo/projects.go')
-rw-r--r--routers/web/repo/projects.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go
index 88f46aa70b..f6be8add0b 100644
--- a/routers/web/repo/projects.go
+++ b/routers/web/repo/projects.go
@@ -653,39 +653,3 @@ func CreateProject(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplGenericProjectsNew)
}
-
-// CreateProjectPost creates an individual and/or organization project
-func CreateProjectPost(ctx *context.Context, form forms.UserCreateProjectForm) {
-
- user := checkContextUser(ctx, form.UID)
- if ctx.Written() {
- return
- }
-
- ctx.Data["ContextUser"] = user
-
- if ctx.HasError() {
- ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
- ctx.HTML(http.StatusOK, tplGenericProjectsNew)
- return
- }
-
- var projectType = models.ProjectTypeIndividual
- if user.IsOrganization() {
- projectType = models.ProjectTypeOrganization
- }
-
- if err := models.NewProject(&models.Project{
- Title: form.Title,
- Description: form.Content,
- CreatorID: user.ID,
- BoardType: form.BoardType,
- Type: projectType,
- }); err != nil {
- ctx.ServerError("NewProject", err)
- return
- }
-
- ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title))
- ctx.Redirect(setting.AppSubURL + "/")
-}