Comments plugin
A comments plugin built with definePlugin: it owns its table, checks typed options, hooks into the host resource's CRUD writes and ships a dashboard extension.
- Plugins
- CRUD
- SQLite
1 services, 16 actions, 2 tables, 9 files
Features
- definePlugin with owned tables and typed options
- Host CRUD hooks: deleting a page deletes its comments
- Catalog event comments.added and a dashboard extension
Service graph
Actions and routes
pages
| Method | Path | Action | Access |
|---|---|---|---|
| POST | /api/pages/page/query | page.list | public |
| GET | /api/pages/page/:id | page.get | public |
| POST | /api/pages/page | page.create | public |
| PATCH | /api/pages/page/:id | page.update | public |
| DELETE | /api/pages/page/:id | page.delete | public |
| POST | /api/pages/page/find-one | page.findOne | public |
| POST | /api/pages/page/count | page.count | public |
| POST | /api/pages/page/exists | page.exists | public |
| POST | /api/pages/page-comment/query | pageComment.list | public |
| GET | /api/pages/page-comment/:id | pageComment.get | public |
| POST | /api/pages/page-comment | pageComment.create | public |
| PATCH | /api/pages/page-comment/:id | pageComment.update | public |
| DELETE | /api/pages/page-comment/:id | pageComment.delete | public |
| POST | /api/pages/page-comment/find-one | pageComment.findOne | public |
| POST | /api/pages/page-comment/count | pageComment.count | public |
| POST | /api/pages/page-comment/exists | pageComment.exists | public |
Database tables
| id | text | PK |
|---|
| id | text | PK |
|---|---|---|
| target_id | text | NOT NULL |
| body | text | NOT NULL |
| created_at | integer | NOT NULL |
Source
Loading source…
Run it
The server listens on port 3001.