mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 12:14:27 +02:00
1 parent
c30ddc3e14
commit
e60d1c7fc8
13 files changed
+29
-41
No files matched your search
@@ -195,12 +195,12 @@ func ChangeProjectStatus(ctx *context.Context) {
|
||||
|
||||
project, err := project_model.GetProjectByIDAndOwner(ctx, id, ctx.ContextUser.ID)
|
||||
if err != nil {
|
||||
ctx.NotFoundOrServerError("GetProjectByID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("GetProjectByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := project_model.ChangeProjectStatusByRepoIDAndID(ctx, 0, project.ID, toClose); err != nil {
|
||||
ctx.NotFoundOrServerError("ChangeProjectStatusByRepoIDAndID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("ChangeProjectStatusByRepoIDAndID", err)
|
||||
return
|
||||
}
|
||||
ctx.JSONRedirect(project_model.ProjectLinkForOrg(ctx.ContextUser, project.ID))
|
||||
@@ -210,7 +210,7 @@ func ChangeProjectStatus(ctx *context.Context) {
|
||||
func DeleteProject(ctx *context.Context) {
|
||||
p, err := project_model.GetProjectByIDAndOwner(ctx, ctx.PathParamInt64("id"), ctx.ContextUser.ID)
|
||||
if err != nil {
|
||||
ctx.NotFoundOrServerError("GetProjectByID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("GetProjectByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ func RenderEditProject(ctx *context.Context) {
|
||||
|
||||
p, err := project_model.GetProjectByIDAndOwner(ctx, ctx.PathParamInt64("id"), ctx.ContextUser.ID)
|
||||
if err != nil {
|
||||
ctx.NotFoundOrServerError("GetProjectByID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("GetProjectByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ func EditProjectPost(ctx *context.Context) {
|
||||
|
||||
p, err := project_model.GetProjectByIDAndOwner(ctx, projectID, ctx.ContextUser.ID)
|
||||
if err != nil {
|
||||
ctx.NotFoundOrServerError("GetProjectByID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("GetProjectByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ func EditProjectPost(ctx *context.Context) {
|
||||
func ViewProject(ctx *context.Context) {
|
||||
project, err := project_model.GetProjectByIDAndOwner(ctx, ctx.PathParamInt64("id"), ctx.ContextUser.ID)
|
||||
if err != nil {
|
||||
ctx.NotFoundOrServerError("GetProjectByID", project_model.IsErrProjectNotExist, err)
|
||||
ctx.ServerError("GetProjectByID", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user