From b12bc5b5541eeba8a7fc411dbbd8e1f1282e8826 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 30 Nov 2024 20:22:32 +0800 Subject: [PATCH] fix: argument minimum for since --- routes/__snapshots__/index.test.ts.snap | 2 +- routes/private/routes/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/__snapshots__/index.test.ts.snap b/routes/__snapshots__/index.test.ts.snap index 9d81acad..ff94fda4 100644 --- a/routes/__snapshots__/index.test.ts.snap +++ b/routes/__snapshots__/index.test.ts.snap @@ -5148,7 +5148,7 @@ paths: name: since required: false schema: - maximum: 0 + minimum: 0 type: integer - description: max 100 in: query diff --git a/routes/private/routes/user.ts b/routes/private/routes/user.ts index afba1c35..6b4d52e4 100644 --- a/routes/private/routes/user.ts +++ b/routes/private/routes/user.ts @@ -589,7 +589,7 @@ export async function setup(app: App) { querystring: t.Object({ subjectType: t.Optional(t.Enum(SubjectType, { description: '条目类型' })), type: t.Optional(t.Enum(CollectionType, { description: '收藏类型' })), - since: t.Optional(t.Integer({ maximum: 0, description: '起始时间戳' })), + since: t.Optional(t.Integer({ minimum: 0, description: '起始时间戳' })), limit: t.Optional( t.Integer({ default: 20, minimum: 1, maximum: 100, description: 'max 100' }), ),