mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
webpack hot reload support
This commit is contained in:
1 parent
d8e1a63f99
commit
0ee306d0cf
15 files changed
+89
-63
No files matched your search
@@ -201,15 +201,15 @@ class UserSearchHandler extends Handler {
|
||||
@param('q', Types.String)
|
||||
@param('exectMatch', Types.Boolean, true)
|
||||
async get(domainId: string, q: string, exactMatch = false) {
|
||||
let udocs;
|
||||
if (exactMatch) udocs = [];
|
||||
else udocs = await user.getPrefixList(q, 20);
|
||||
const udoc = await user.getById(domainId, parseInt(q, 10));
|
||||
let udoc = await user.getById(domainId, parseInt(q, 10));
|
||||
const udocs = udoc ? [udoc] : [];
|
||||
udoc = await user.getByUname(domainId, q);
|
||||
if (udoc) udocs.push(udoc);
|
||||
udoc = await user.getByEmail(domainId, q);
|
||||
if (udoc) udocs.push(udoc);
|
||||
if (!exactMatch) udocs.push(...await user.getPrefixList(q, 20));
|
||||
for (const i in udocs) {
|
||||
if (udocs[i].gravatar) {
|
||||
udocs[i].gravatar = misc.gravatar(udocs[i].gravatar);
|
||||
}
|
||||
udocs[i].gravatar = misc.gravatar(udocs[i].gravatar || '');
|
||||
}
|
||||
this.response.body = udocs;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user