diff --git a/Public API v1.yaml b/Public API v1.yaml index 5b711a1..9b46e55 100644 --- a/Public API v1.yaml +++ b/Public API v1.yaml @@ -2761,6 +2761,7 @@ components: - type - text - read + - timestamp type: object properties: type: @@ -2777,6 +2778,8 @@ components: type: boolean data: type: object + timestamp: + type: number NotificationAction: type: string enum: diff --git a/backend/notifications.js b/backend/notifications.js index 954c5d4..daa0a83 100644 --- a/backend/notifications.js +++ b/backend/notifications.js @@ -26,7 +26,8 @@ exports.createNotification = (type, actions, data, user_uid) => { data: data, user_uid: user_uid, uid: uuid(), - read: false + read: false, + timestamp: Date.now()/1000 } return notification; } diff --git a/src/api-types/models/Notification.ts b/src/api-types/models/Notification.ts index 704533c..ce99fe6 100644 --- a/src/api-types/models/Notification.ts +++ b/src/api-types/models/Notification.ts @@ -12,4 +12,5 @@ export type Notification = { action?: Array; read: boolean; data?: any; + timestamp: number; }; \ No newline at end of file