feat: 完成整体内容开发
This commit is contained in:
@@ -58,6 +58,15 @@ export const addQaRecord = (record: Omit<QaRecord, "time" | "timestamp">) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取最近问答记录
|
||||
*
|
||||
* 返回副本并按“最新在前”排序,避免 API handler 或前端展示逻辑误改内存原数组
|
||||
*/
|
||||
export const getQaRecords = () => {
|
||||
return [...qaRecords].reverse();
|
||||
};
|
||||
|
||||
/** 生成 `/api/stats` 响应,实时计算 uptime 和有效缓存数量 */
|
||||
export const getRuntimeStats = () => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user