fix(admin): resolve CI lint and user subscriptions regression
This commit is contained in:
@@ -35,12 +35,12 @@ func buildAccountTodayStatsBatchCacheKey(accountIDs []int64) string {
|
||||
}
|
||||
var b strings.Builder
|
||||
b.Grow(len(accountIDs) * 6)
|
||||
b.WriteString("accounts_today_stats:")
|
||||
_, _ = b.WriteString("accounts_today_stats:")
|
||||
for i, id := range accountIDs {
|
||||
if i > 0 {
|
||||
b.WriteByte(',')
|
||||
_ = b.WriteByte(',')
|
||||
}
|
||||
b.WriteString(strconv.FormatInt(id, 10))
|
||||
_, _ = b.WriteString(strconv.FormatInt(id, 10))
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
@@ -86,11 +86,14 @@ func (h *UserHandler) List(c *gin.Context) {
|
||||
}
|
||||
|
||||
filters := service.UserListFilters{
|
||||
Status: c.Query("status"),
|
||||
Role: c.Query("role"),
|
||||
Search: search,
|
||||
Attributes: parseAttributeFilters(c),
|
||||
IncludeSubscriptions: parseBoolQueryWithDefault(c.Query("include_subscriptions"), true),
|
||||
Status: c.Query("status"),
|
||||
Role: c.Query("role"),
|
||||
Search: search,
|
||||
Attributes: parseAttributeFilters(c),
|
||||
}
|
||||
if raw, ok := c.GetQuery("include_subscriptions"); ok {
|
||||
includeSubscriptions := parseBoolQueryWithDefault(raw, true)
|
||||
filters.IncludeSubscriptions = &includeSubscriptions
|
||||
}
|
||||
|
||||
users, total, err := h.adminService.ListUsers(c.Request.Context(), page, pageSize, filters)
|
||||
|
||||
Reference in New Issue
Block a user