We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15feb28 commit e25c90cCopy full SHA for e25c90c
routes/dailyProblem.js
@@ -12,6 +12,7 @@ router.get("/api/v1/daily-problem", async (ctx) => {
12
// 1. 如果用户指定了时间,则获取指定时间,否则获取今天
13
// 2. 根据上一步计算的时间和活动开始时间计算当前是 Day 几
14
// 3. 根据 Day 几 计算出具体返回哪一个题目
15
+ // !!注意: 如果用户指定的时间大于今天,则返回”题目不存在,仅支持查询历史每日一题“
16
17
const date = ctx.query.date; // 用户指定的实际
18
@@ -72,6 +73,8 @@ router.get("/api/v1/daily-problem", async (ctx) => {
72
73
router.get("/api/v1/daily-problem/solution", async (ctx) => {
74
// 逻辑和上面类似,只是返回值为 Markdown
75
76
+ // !!注意: 如果用户指定的 day 大于今天对应的day,则返回”题解不存在,仅支持查询历史官方题解“
77
+
78
const day = ctx.query.day || getCurrentDay(); // 用户指定的实际第几天(注意这里的 day 是数字,含义为第 day 天)
79
if (day in solutions) {
80
ctx.body = success({
0 commit comments