Skip to content

Commit

Permalink
emit balanced event: notifications.add
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Dec 30, 2024
1 parent ccbdf8e commit 6a777ed
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: [email protected]
* @Date: 2022-12-11 10:54:51
* @LastEditors: 孙浩林 sunhaolin@steedos.com
* @LastEditTime: 2023-08-17 15:06:54
* @LastEditors: baozhoutao@steedos.com
* @LastEditTime: 2024-12-30 17:37:52
* @Description: 发送通知服务
*/
"use strict";
Expand Down Expand Up @@ -73,7 +73,8 @@ module.exports = {
},
},
async handler(ctx) {
this.broker.logger.info('[service][notifications]===>', 'add', ctx.params)
const { from, to, message } = ctx.params;
this.broker.emit('notifications.add', {from, to, message})
return Fiber(function () {
Creator.addNotifications(
ctx.params.message,
Expand Down

0 comments on commit 6a777ed

Please sign in to comment.