func UpdateOrgQuota(c *middleware.Context) *rbody.ApiResponse { orgId := c.ParamsInt64(":orgId") target := c.Params(":target") limit := c.ParamsInt64(":limit") if _, ok := setting.Quota.Org.ToMap()[target]; !ok { return rbody.NotFound } quota := m.OrgQuotaDTO{ OrgId: orgId, Target: target, Limit: limit, } err := sqlstore.UpdateOrgQuota("a) if err != nil { return rbody.ErrResp(500, err) } return rbody.OkResp("quota", quota) }