aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/projects.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go
index ed6a2e645f..37212179c9 100644
--- a/routers/web/org/projects.go
+++ b/routers/web/org/projects.go
@@ -610,6 +610,23 @@ func SetDefaultProjectBoard(ctx *context.Context) {
})
}
+// UnsetDefaultProjectBoard unset default board for uncategorized issues/pulls
+func UnsetDefaultProjectBoard(ctx *context.Context) {
+ project, _ := CheckProjectBoardChangePermissions(ctx)
+ if ctx.Written() {
+ return
+ }
+
+ if err := project_model.SetDefaultBoard(project.ID, 0); err != nil {
+ ctx.ServerError("SetDefaultBoard", err)
+ return
+ }
+
+ ctx.JSON(http.StatusOK, map[string]interface{}{
+ "ok": true,
+ })
+}
+
// MoveIssues moves or keeps issues in a column and sorts them inside that column
func MoveIssues(ctx *context.Context) {
if ctx.Doer == nil {