bugfix
This commit is contained in:
parent
4ddbba1400
commit
c17ade64e1
|
@ -32,15 +32,15 @@ func alertSubscribeAdd(c *gin.Context) {
|
||||||
var f models.AlertSubscribe
|
var f models.AlertSubscribe
|
||||||
ginx.BindJSON(c, &f)
|
ginx.BindJSON(c, &f)
|
||||||
|
|
||||||
if f.GroupId <= 0 {
|
|
||||||
ginx.Bomb(http.StatusBadRequest, "group_id invalid")
|
|
||||||
}
|
|
||||||
|
|
||||||
username := c.MustGet("username").(string)
|
username := c.MustGet("username").(string)
|
||||||
f.CreateBy = username
|
f.CreateBy = username
|
||||||
f.UpdateBy = username
|
f.UpdateBy = username
|
||||||
f.GroupId = ginx.UrlParamInt64(c, "id")
|
f.GroupId = ginx.UrlParamInt64(c, "id")
|
||||||
|
|
||||||
|
if f.GroupId <= 0 {
|
||||||
|
ginx.Bomb(http.StatusBadRequest, "group_id invalid")
|
||||||
|
}
|
||||||
|
|
||||||
ginx.NewRender(c).Message(f.Add())
|
ginx.NewRender(c).Message(f.Add())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue