fix can delete blogroll and about page & fix delete and readd article bug

This commit is contained in:
deepzz0
2018-01-07 20:30:14 +08:00
parent 3245c0e0d3
commit 405fbaf24f
2 changed files with 8 additions and 3 deletions

2
api.go
View File

@@ -152,7 +152,7 @@ func apiPostDelete(c *gin.Context) {
var i int
for _, v := range c.Request.PostForm["cid[]"] {
i, err = strconv.Atoi(v)
if err != nil || i < 1 {
if err != nil || int32(i) < setting.Conf.General.StartID {
err = errors.New("参数错误")
return
}