fix: rating-history API - pass auth token, fix table/column names

- frontend: pass token to listRatingHistory API call
- backend: fix SQL table name redeem_logs -> redeem_records
- backend: fix SQL column name title -> task_code in daily_task_logs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
这个提交包含在:
cryptocommuniums-afk
2026-02-16 12:22:22 +08:00
父节点 2117d1e298
当前提交 bc2e085c70
修改 3 个文件,包含 5 行新增5 行删除

查看文件

@@ -247,13 +247,13 @@ SolutionAccessService::ListRatingHistory(int64_t user_id, int limit) {
"' || problem_id) as note "
"FROM problem_solution_view_logs WHERE user_id=? AND cost > 0 "
"UNION ALL "
"SELECT 'daily_task' as type, created_at, reward as change, title as "
"SELECT 'daily_task' as type, created_at, reward as change, task_code as "
"note "
"FROM daily_task_logs WHERE user_id=? "
"UNION ALL "
"SELECT 'redeem' as type, created_at, -total_cost as change, item_name "
"as note "
"FROM redeem_logs WHERE user_id=? "
"FROM redeem_records WHERE user_id=? "
"ORDER BY created_at DESC LIMIT ?";
CheckSqlite(sqlite3_prepare_v2(db, sql, -1, &stmt, nullptr), db,