feat: 完成源晶权限与经验系统并优化 me/admin 交互

这个提交包含在:
cryptocommuniums-afk
2026-02-23 20:02:46 +08:00
父节点 2b6def2560
当前提交 43cbd38bac
修改 104 个文件,包含 13348 行新增776 行删除

查看文件

@@ -42,9 +42,15 @@ void LeaderboardController::global(
if (!limit_str.empty()) {
limit = std::max(1, std::min(500, std::stoi(limit_str)));
}
std::string scope = req->getParameter("scope");
if (scope.empty()) scope = "all";
if (scope != "all" && scope != "week" && scope != "today") {
cb(JsonError(drogon::k400BadRequest, "invalid scope"));
return;
}
services::UserService users(csp::AppState::Instance().db());
const auto rows = users.GlobalLeaderboard(limit);
const auto rows = users.GlobalLeaderboard(limit, scope);
Json::Value arr(Json::arrayValue);
for (const auto& r : rows) arr.append(domain::ToJson(r));