mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add log for send-mail-error
This commit is contained in:
1 parent
a81d514b10
commit
72998f643b
4 files changed
+20
-2
No files matched your search
@@ -15,6 +15,7 @@ import { PERM, PRIV } from '../model/builtin';
|
||||
import {
|
||||
Route, Handler, Types, param,
|
||||
} from '../service/server';
|
||||
import * as bus from '../service/bus';
|
||||
import { isTitle, isContent } from '../lib/validator';
|
||||
|
||||
export const typeMapper = {
|
||||
@@ -165,6 +166,11 @@ class DiscussionCreateHandler extends DiscussionHandler {
|
||||
else name = _name;
|
||||
if (highlight) this.checkPerm(PERM.PERM_HIGHLIGHT_DISCUSSION);
|
||||
if (pin) this.checkPerm(PERM.PERM_PIN_DISCUSSION);
|
||||
await bus.serial(
|
||||
'discussion/before-add',
|
||||
domainId, typeMapper[type], name, this.user._id,
|
||||
title, content, this.request.ip, highlight, pin,
|
||||
);
|
||||
const did = await discussion.add(
|
||||
domainId, typeMapper[type], name, this.user._id,
|
||||
title, content, this.request.ip, highlight, pin,
|
||||
|
||||
Reference in new issue
Block a user