This commit is contained in:
hero920103 committed 2026-10-19 01:13:17 +08:00
1 parent 5718a00e31
commit 1850ac640e
226 files changed
+37772 -12071

No files matched your search

+1 -6
View File
@@ -15,13 +15,8 @@ type BackendTenantQuotaController struct {
// GetQuotaInfo GET /backend/tenant/quotaInfo
// 返回当前登录租户的用户数使用情况与生效套餐。
func (c *BackendTenantQuotaController) GetQuotaInfo() {
// 只认令牌:?tid= 兜底会让未绑定企业的登录态改参数就去读别人的配额与套餐
tid := backendJWTTenantID(c.Ctx.Request.Header.Get("Authorization"))
if tid == 0 {
// 兜底:从 tid 参数取(部分历史调用未带 token 场景)
if v, err := c.GetUint64("tid"); err == nil {
tid = v
}
}
if tid == 0 {
c.Data["json"] = map[string]interface{}{"code": 401, "msg": "未登录或非法请求"}
_ = c.ServeJSON()