Skip to content

Commit

Permalink
chore(backend): fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayamame-beans committed Jul 17, 2024
1 parent 85a4d07 commit 031c6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/users/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
qb.where('user.name ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' });

if (isUsername) {
qb.orWhere('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' })
qb.orWhere('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' });
} else if (this.userEntityService.validateLocalUsername(ps.query)) { // Also search username if it qualifies as username
qb.orWhere('user.usernameLower LIKE :username', { username: '%' + sqlLikeEscape(ps.query.toLowerCase()) + '%' });
}
Expand Down

0 comments on commit 031c6f5

Please sign in to comment.