File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff 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- }
You can’t perform that action at this time.
0 commit comments