Fix data type of `notification.isDefault` and `notification.active` (#1765)

pull/1773/head
Louis Lam 3 years ago
parent 81d5360520
commit fdbdf83a0d

@ -22,7 +22,10 @@ async function sendNotificationList(socket) {
]); ]);
for (let bean of list) { for (let bean of list) {
result.push(bean.export()); let notificationObject = bean.export();
notificationObject.isDefault = (notificationObject.isDefault === 1);
notificationObject.active = (notificationObject.active === 1);
result.push(notificationObject);
} }
io.to(socket.userID).emit("notificationList", result); io.to(socket.userID).emit("notificationList", result);

Loading…
Cancel
Save