lint fixes
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import define from '../../define.js';
|
||||
import { Followings, Users } from '@/models/index.js';
|
||||
import { Brackets } from 'typeorm';
|
||||
import { Followings, Users } from '@/models/index.js';
|
||||
import { USER_ACTIVE_THRESHOLD } from '@/const.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import define from '../../define.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['users'],
|
||||
@@ -67,7 +67,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||
|
||||
const query = Users.createQueryBuilder('user')
|
||||
.where(`user.id IN (${ followingQuery.getQuery() })`)
|
||||
.andWhere(`user.id != :meId`, { meId: me.id })
|
||||
.andWhere('user.id != :meId', { meId: me.id })
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.andWhere('user.usernameLower LIKE :username', { username: ps.username.toLowerCase() + '%' })
|
||||
.andWhere(new Brackets(qb => { qb
|
||||
@@ -85,7 +85,7 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||
if (users.length < ps.limit) {
|
||||
const otherQuery = await Users.createQueryBuilder('user')
|
||||
.where(`user.id NOT IN (${ followingQuery.getQuery() })`)
|
||||
.andWhere(`user.id != :meId`, { meId: me.id })
|
||||
.andWhere('user.id != :meId', { meId: me.id })
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.andWhere('user.usernameLower LIKE :username', { username: ps.username.toLowerCase() + '%' })
|
||||
.andWhere('user.updatedAt IS NOT NULL');
|
||||
|
Reference in New Issue
Block a user