fix: enforce VIP content boundary and PATCH updates

This commit is contained in:
AHMED
2026-10-09 16:27:49 +03:00
parent 61aea8d83e
commit 87e653cc96
9 changed files with 103 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ curl -X POST http://localhost:3000/api/agent/posts \
-d '{"title":"...","slug":"my-post","dek":"...","category":"وكلاء","access":"vip","teaser":"...","readingMinutes":8,"content":{"root":{"type":"root","children":[],"format":"","indent":0,"version":1}}}'
# update (cannot change status)
curl -X PUT http://localhost:3000/api/agent/posts/my-post -H "x-agent-key: $AGENT_API_KEY" ...
curl -X PATCH http://localhost:3000/api/agent/posts/my-post -H "x-agent-key: $AGENT_API_KEY" ...
```
Omitting `cover` assigns the per-category default cover.