mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-24 23:38:40 +08:00
dev: add notif.ack message
This commit is contained in:
parent
3f3f4e6cb9
commit
00e0fb350a
@ -71,6 +71,8 @@ class NotificationService extends BaseService {
|
|||||||
|
|
||||||
router.use(auth2);
|
router.use(auth2);
|
||||||
|
|
||||||
|
const svc_event = this.services.get('event');
|
||||||
|
|
||||||
[['ack','acknowledged'],['read','read']].forEach(([ep_name, col_name]) => {
|
[['ack','acknowledged'],['read','read']].forEach(([ep_name, col_name]) => {
|
||||||
Endpoint({
|
Endpoint({
|
||||||
route: '/mark-' + ep_name,
|
route: '/mark-' + ep_name,
|
||||||
@ -93,6 +95,13 @@ class NotificationService extends BaseService {
|
|||||||
[ack_ts, req.body.uid, req.user.id],
|
[ack_ts, req.body.uid, req.user.id],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
svc_event.emit('outer.gui.notif.ack', {
|
||||||
|
user_id_list: [req.user.id],
|
||||||
|
response: {
|
||||||
|
uid: req.body.uid,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
res.json({});
|
res.json({});
|
||||||
}
|
}
|
||||||
}).attach(router);
|
}).attach(router);
|
||||||
|
Loading…
Reference in New Issue
Block a user