https://github.com/lskjs/lsk-notification
LSK Notification and Push info module
https://github.com/lskjs/lsk-notification
isomorphic javascript lsk module nodejs notifications react universal
Last synced: 3 months ago
JSON representation
LSK Notification and Push info module
- Host: GitHub
- URL: https://github.com/lskjs/lsk-notification
- Owner: lskjs
- License: mit
- Created: 2017-05-05T12:51:35.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-11T14:09:41.000Z (almost 9 years ago)
- Last Synced: 2025-01-17T23:30:28.464Z (over 1 year ago)
- Topics: isomorphic, javascript, lsk, module, nodejs, notifications, react, universal
- Language: JavaScript
- Homepage: https://lsk.mgbeta.ru/demo/notification
- Size: 18.6 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# LSK Notification module
```js
POST /api/module/notification --- создать нотификацию (для тестов)
body {
subjectId: 'id главный',
subjectType: 'id главной модели',
objectId: 'id',
objectType: 'id модели',
userId: 'Кому присылается сообщение'
}
```
```js
GET /api/module/notification --- (запросить список нотификаций)
result [
{
subjectId: 'id главный',
subjectType: 'id главной модели',
objectId: 'id',
objectType: 'id модели',
userId: 'Кому присылается сообщение',
object: Populate Object,
subject: Populate Subject,
user: Populate user
}
]
```
```js
POST /:id/view --- Уведомить о просмотре нотификации
id - id нотификации
Для примера можно пересылать сообщения
```