Improve this
This commit is contained in:
2 files changed
+5
-3
No files matched your search
+4
-2
@@ -171,9 +171,11 @@ app.get('/comments/level', handler => commentsLevelGetHandler(handler), {
|
||||
'The page you want to get, starts from `0`. Default is `0`.'
|
||||
})
|
||||
),
|
||||
mode: t.Union([t.Literal('0'), t.Literal('1')], {
|
||||
description: '0 for top, 1 for recent'
|
||||
mode: t.Optional(
|
||||
t.Union([t.Literal('recent'), t.Literal('top')], {
|
||||
description: 'Default is `recent`.'
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
app.get(
|
||||
|
||||
@@ -19,7 +19,7 @@ export const handler = async (handler: Context) => {
|
||||
page: page ?? '0',
|
||||
total: '0',
|
||||
secret: 'Wmfd2893gb7',
|
||||
mode,
|
||||
mode: mode ? (mode == 'recent' ? '0' : '1') : '0', //Don't worry about it
|
||||
levelID: id
|
||||
}),
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user