mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
feat: notifications.list
This commit is contained in:
1 parent
fb8d8f8159
commit
007cbeaab6
5 files changed
+246
-19
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { Notification } from "@server/models";
|
||||
import presentUser from "./user";
|
||||
|
||||
export default function presentNotification(notification: Notification) {
|
||||
return {
|
||||
id: notification.id,
|
||||
viewedAt: notification.viewedAt,
|
||||
createdAt: notification.createdAt,
|
||||
event: notification.event,
|
||||
userId: notification.userId,
|
||||
user: presentUser(notification.user),
|
||||
actorId: notification.actorId,
|
||||
actor: notification.actor ? presentUser(notification.actor) : undefined,
|
||||
commentId: notification.commentId,
|
||||
documentId: notification.documentId,
|
||||
revisionId: notification.revisionId,
|
||||
collectionId: notification.collectionId,
|
||||
teamId: notification.teamId,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user