Changeset e882b92 for chapterx-frontend/src/store/notificationStore.ts
- Timestamp:
- 08/24/26 20:57:09 (13 days ago)
- Branches:
- main
- Parents:
- a6e33d1
- File:
-
- 1 edited
-
chapterx-frontend/src/store/notificationStore.ts (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chapterx-frontend/src/store/notificationStore.ts
ra6e33d1 re882b92 17 17 notifications: Notification[] 18 18 fetchUserNotifications: (userId: number) => Promise<void> 19 addNotification: (n: { recipientUserId: number; type: string; content: string; link?: string }) => Promise<void>19 addNotification: (n: { userId: number; contentType: string; content: string; storyId?: number; link?: string }) => Promise<void> 20 20 markAllRead: () => Promise<void> 21 21 markRead: (id: number) => Promise<void> … … 33 33 notification_id: n.id, 34 34 user_id: userId, 35 type: n. type ?? 'info',36 title: n. type ?? 'Notification',35 type: n.contentType ?? 'info', 36 title: n.contentType ?? 'Notification', 37 37 message: n.content, 38 38 link: n.link, … … 46 46 }, 47 47 48 addNotification: async ({ recipientUserId, type, content, link }) => {48 addNotification: async ({ userId, contentType, content, storyId, link }) => { 49 49 try { 50 50 await axios.post(`${API}/notifications`, { 51 51 content, 52 recipientUserId, 53 type, 52 contentType, 53 userId, 54 storyId, 54 55 link, 55 56 }, { headers: getAuthHeaders() })
Note:
See TracChangeset
for help on using the changeset viewer.
