mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
chore: backend infrastructure improvements
- add URI versioning: global prefix changed to api/v1, all frontend call sites updated - add AbortSignal.timeout to all outbound fetch calls (10s API, 15s scrapers) - add X-Request-Id response header and requestId field in error payloads - add response compression via @fastify/compress (gzip + brotli) - add security headers via @fastify/helmet with CSP for the Vite SPA - tune pg pool: max 20, idle/connection/statement timeouts on app and migration pools - add GET /api/v1/health endpoint via @nestjs/terminus with DB connectivity check
This commit is contained in:
@@ -69,7 +69,7 @@ async function setRating(star: number) {
|
||||
const newRating = localRating.value === star ? null : star
|
||||
localRating.value = newRating
|
||||
emit('rating-change', newRating)
|
||||
await api(`/api/books/${props.book.id}/metadata`, {
|
||||
await api(`/api/v1/books/${props.book.id}/metadata`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ rating: newRating }),
|
||||
|
||||
Reference in New Issue
Block a user