From e5c350d7405c04238883b23f5cbfa2c16fe3c51f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 16 Aug 2018 23:33:11 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/users/notes.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts index c60050d3c..ff7855bde 100644 --- a/src/server/api/endpoints/users/notes.ts +++ b/src/server/api/endpoints/users/notes.ts @@ -16,17 +16,13 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => if (usernameErr) return rej('invalid username param'); if (userId === undefined && username === undefined) { - return rej('userId or pair of username and host is required'); + return rej('userId or username is required'); } // Get 'host' parameter const [host, hostErr] = $.str.optional.get(params.host); if (hostErr) return rej('invalid host param'); - if (userId === undefined && host === undefined) { - return rej('userId or pair of username and host is required'); - } - // Get 'includeReplies' parameter const [includeReplies = true, includeRepliesErr] = $.bool.optional.get(params.includeReplies); if (includeRepliesErr) return rej('invalid includeReplies param');