Skip to content

Commit 658a636

Browse files
KN4CK3Rwxiaoguang
andauthored
Removed unused method. (#18129)
Co-authored-by: wxiaoguang <[email protected]>
1 parent ccb7978 commit 658a636

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

routers/web/repo/projects.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -653,39 +653,3 @@ func CreateProject(ctx *context.Context) {
653653

654654
ctx.HTML(http.StatusOK, tplGenericProjectsNew)
655655
}
656-
657-
// CreateProjectPost creates an individual and/or organization project
658-
func CreateProjectPost(ctx *context.Context, form forms.UserCreateProjectForm) {
659-
660-
user := checkContextUser(ctx, form.UID)
661-
if ctx.Written() {
662-
return
663-
}
664-
665-
ctx.Data["ContextUser"] = user
666-
667-
if ctx.HasError() {
668-
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
669-
ctx.HTML(http.StatusOK, tplGenericProjectsNew)
670-
return
671-
}
672-
673-
var projectType = models.ProjectTypeIndividual
674-
if user.IsOrganization() {
675-
projectType = models.ProjectTypeOrganization
676-
}
677-
678-
if err := models.NewProject(&models.Project{
679-
Title: form.Title,
680-
Description: form.Content,
681-
CreatorID: user.ID,
682-
BoardType: form.BoardType,
683-
Type: projectType,
684-
}); err != nil {
685-
ctx.ServerError("NewProject", err)
686-
return
687-
}
688-
689-
ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title))
690-
ctx.Redirect(setting.AppSubURL + "/")
691-
}

0 commit comments

Comments
 (0)