Nafsika Books API
JSON REST backend for authentication, subscribers, and media uploads.
JSON REST backend for authentication, subscribers, and media uploads.
GET /api/health
Returns { "ok": true } when the server is running.
Authenticated routes require a Bearer JWT from
POST /api/auth/login.
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| POST | /api/auth/login |
Admin login (JWT) |
| GET | /api/authors |
List authors (auth) |
| POST | /api/authors |
Create author (auth) |
| GET | /api/featured-book |
List featured book blocks (homepage order) |
| POST | /api/featured-book |
Create featured book block (auth) |
| PUT | /api/featured-book/:id |
Update featured book block (auth) |
| DELETE | /api/featured-book/:id |
Delete one featured block (auth) |
| DELETE | /api/featured-book |
Delete all featured blocks (auth) |
| GET | /api/subscribers |
List subscribers (auth) |
| GET | /api/uploads |
List uploads (auth) |
| POST | /api/uploads |
Upload file (auth) |
| PUT | /api/uploads/:filename |
Rename file (auth) |
| DELETE | /api/uploads/:filename |
Delete file (auth) |