refactor boardPutConfigs

This commit is contained in:
Ulric Qin 2022-11-11 12:11:39 +08:00
parent aa26ddfb48
commit 99fbdae121
1 changed files with 8 additions and 1 deletions

View File

@ -144,7 +144,14 @@ func boardPutConfigs(c *gin.Context) {
ginx.BindJSON(c, &f)
me := c.MustGet("user").(*models.User)
bo := Board(ginx.UrlParamInt64(c, "bid"))
bid := ginx.UrlParamStr(c, "bid")
bo, err := models.BoardGet("id = ? or ident = ?", bid, bid)
ginx.Dangerous(err)
if bo == nil {
ginx.Bomb(http.StatusNotFound, "No such dashboard")
}
// check permission
bgrwCheck(c, bo.GroupId)