mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fixes & improments
This commit is contained in:
11 files changed
+15
-18
No files matched your search
@@ -72,7 +72,7 @@ class DiscussionMainHandler extends Handler {
|
||||
const parentType = { $in: Object.keys(typeMapper).map((i) => typeMapper[i]) };
|
||||
all &&= this.user.hasPerm(PERM.PERM_MOD_BADGE);
|
||||
const [ddocs, dpcount] = await this.paginate(
|
||||
discussion.getMulti(domainId, { parentType, ...all ? {} : { hidden: false } }),
|
||||
discussion.getMulti(domainId, { parentType, ...all ? {} : { hidden: false } }).hint('discussionSort'),
|
||||
page,
|
||||
'discussion',
|
||||
);
|
||||
|
||||
@@ -507,6 +507,8 @@ class HomeDomainHandler extends Handler {
|
||||
|
||||
@param('id', Types.String)
|
||||
async postLeave({ }, id: string) {
|
||||
const ddoc = await domain.get(id);
|
||||
if (!ddoc) throw new NotFoundError(id);
|
||||
await domain.setJoin(id, this.user._id, false);
|
||||
this.back();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user