feat: 可选社区上报与官方精选展柜

默认关闭,仪表盘一键开关;枢纽由运维配置收报,人工精选后展示于 /showcase。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 04:22:59 +08:00
parent 0abfb32194
commit 95c2154087
26 changed files with 1730 additions and 147 deletions

View File

@@ -54,6 +54,9 @@ func (r *RateLimiter) limitFor(action string) int {
if action == "friend_link" {
return 5
}
if action == "community_heartbeat" {
return 30
}
return r.settings.RateLimitFor(action)
}
@@ -61,6 +64,9 @@ func (r *RateLimiter) windowFor(action string) time.Duration {
if action == "friend_link" {
return time.Hour
}
if action == "community_heartbeat" {
return time.Hour
}
return time.Duration(r.settings.RateLimitWindowSec()) * time.Second
}