Fix bug
This commit is contained in:
parent
cfee87d3ef
commit
ae16b45c11
6 changed files with 15 additions and 10 deletions
|
|
@ -4,7 +4,7 @@ import define from '../../define';
|
|||
import { ApiError } from '../../error';
|
||||
import { Users, Followings } from '../../../../models';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { toPuny } from '../../../../misc/convert-host';
|
||||
import { toPunyNullable } from '../../../../misc/convert-host';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
|
@ -66,7 +66,7 @@ export const meta = {
|
|||
export default define(meta, async (ps, me) => {
|
||||
const user = await Users.findOne(ps.userId != null
|
||||
? { id: ps.userId }
|
||||
: { usernameLower: ps.username!.toLowerCase(), host: toPuny(ps.host!) });
|
||||
: { usernameLower: ps.username!.toLowerCase(), host: toPunyNullable(ps.host) });
|
||||
|
||||
if (user == null) {
|
||||
throw new ApiError(meta.errors.noSuchUser);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue