Merge branch 'master' of https://github.com/syuilo/misskey
This commit is contained in:
commit
58f3c6aab7
1 changed files with 1 additions and 5 deletions
|
@ -16,17 +16,13 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
|
||||||
if (usernameErr) return rej('invalid username param');
|
if (usernameErr) return rej('invalid username param');
|
||||||
|
|
||||||
if (userId === undefined && username === undefined) {
|
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
|
// Get 'host' parameter
|
||||||
const [host, hostErr] = $.str.optional.get(params.host);
|
const [host, hostErr] = $.str.optional.get(params.host);
|
||||||
if (hostErr) return rej('invalid host param');
|
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
|
// Get 'includeReplies' parameter
|
||||||
const [includeReplies = true, includeRepliesErr] = $.bool.optional.get(params.includeReplies);
|
const [includeReplies = true, includeRepliesErr] = $.bool.optional.get(params.includeReplies);
|
||||||
if (includeRepliesErr) return rej('invalid includeReplies param');
|
if (includeRepliesErr) return rej('invalid includeReplies param');
|
||||||
|
|
Loading…
Reference in a new issue