fix(frontend): search user with trailing space (#11184)
* fix(frontend): search user with trailing space * fix(backend): search user with trailing space * Update search.ts --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -52,6 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日
|
||||
|
||||
ps.query = ps.query.trim();
|
||||
const isUsername = ps.query.startsWith('@');
|
||||
|
||||
let users: User[] = [];
|
||||
|
@@ -91,6 +91,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
let user;
|
||||
|
||||
const isModerator = await this.roleService.isModerator(me);
|
||||
ps.username = ps.username?.trim();
|
||||
|
||||
if (ps.userIds) {
|
||||
if (ps.userIds.length === 0) {
|
||||
|
Reference in New Issue
Block a user