From daa0ca72a718ed4f80b4f7321ad808d6a7d3c436 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 6 Apr 2022 00:04:25 +0900 Subject: [PATCH] fix(api): parameter validation of users/show was wrong --- CHANGELOG.md | 3 +-- packages/backend/src/server/api/endpoints/users/show.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b233f0a7..ee91d4344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,7 @@ You should also include the user name that made the change. - Improve webhook @syuilo ### Bugfixes -- - +- API: parameter validation of users/show was wrong ## 12.109.2 (2022/04/03) diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index b1a568145..183ff1b8b 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -23,9 +23,9 @@ export const meta = { items: { type: 'object', ref: 'UserDetailed', - } + }, }, - ] + ], }, errors: { @@ -70,7 +70,7 @@ export const paramDef = { description: 'The local host is represented with `null`.', }, }, - required: ['username', 'host'], + required: ['username'], }, ], } as const;