zeeguu / api

API for tracking a learner's progress when reading materials in a foreign language and recommending further personalized exercises and readings.
https://zeeguu.org
MIT License
8 stars 24 forks source link

PWA Notification Endpoint(s) #295

Open Sprangle opened 1 week ago

Sprangle commented 1 week ago

I need an endpoint that can be used for sending the user specific notifications.

@mircealungu and I discussed the possibility for a secondary endpoint that only fetches if the user actually clicks on the notification which could log data such as notificationId, user session ID and timestamp.

Here is my current PR: https://github.com/zeeguu/web/pull/601

I currently use my own mock data via. a json file: [ { "message": "Mock data notification: Remember to complete your daily exercises!", "notificationId": "123", "url": "/exercises" }, { "message": "Mock data notification: Find today's interesting article!", "notificationId": "123", "url": "/articles" }, { "message": "Mock data notification: Remember to practice your recently learned words!", "notificationId": "123", "url": "/words" }, { "message": "Mock data notification: Take a look at your history with Zeeguu!", "notificationId": "123", "url": "/history" } ]

tfnribeiro commented 4 days ago

Would this be best to implement via a new table @mircealungu ?

tfnribeiro commented 3 days ago

Note: The application should send a notification id with the message and the url it should take, the sw makes sure you can send the notification before asking.