diff --git a/calendar/api_cal.go b/calendar/api_cal.go index 1e4a92d..c941362 100644 --- a/calendar/api_cal.go +++ b/calendar/api_cal.go @@ -33,10 +33,10 @@ func ApiCalQuery(c *gin.Context) { if grp_id == 0 { 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) { 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)) } else { result = db.Find(&cals)