fix(backend): 凍結されたユーザーが一部APIのレスポンスに含まれる問題を修正

This commit is contained in:
syuilo 2023-05-07 17:36:13 +09:00
parent 50985b2ffd
commit 95a2de8d54
3 changed files with 6 additions and 3 deletions

View file

@ -50,8 +50,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private queryService: QueryService,
) {
super(meta, paramDef, async (ps, me) => {
const query = this.usersRepository.createQueryBuilder('user');
query.where('user.isExplorable = TRUE');
const query = this.usersRepository.createQueryBuilder('user')
.where('user.isExplorable = TRUE')
.andWhere('user.isSuspended = FALSE');
switch (ps.state) {
case 'alive': query.andWhere('user.updatedAt > :date', { date: new Date(Date.now() - 1000 * 60 * 60 * 24 * 5) }); break;