update
parent
1766bdad8a
commit
ce56a78f52
|
@ -33,10 +33,10 @@ func ApiCalQuery(c *gin.Context) {
|
||||||
if grp_id == 0 {
|
if grp_id == 0 {
|
||||||
panic(errors.ErrorNotFound)
|
panic(errors.ErrorNotFound)
|
||||||
}
|
}
|
||||||
result = db.Find(&cals, "`group_id` = ? ", grp_id)
|
result = db.Find(&cals, "group_id = ? ", grp_id)
|
||||||
} else if !auth.ACHas(c, auth.ADMIN, auth.SYSTEM) {
|
} else if !auth.ACHas(c, auth.ADMIN, auth.SYSTEM) {
|
||||||
result = db.
|
result = db.
|
||||||
Find(&cals, "`group_id` in (?) or group_id = 0",
|
Find(&cals, "group_id in (?) or group_id = 0",
|
||||||
db.Table("groups").Select("id").Where("name in ?", cl.Groups))
|
db.Table("groups").Select("id").Where("name in ?", cl.Groups))
|
||||||
} else {
|
} else {
|
||||||
result = db.Find(&cals)
|
result = db.Find(&cals)
|
||||||
|
|
Loading…
Reference in New Issue