File size: 596 Bytes
dcb1716
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ADMIN_KEY=your-secret-admin-key
BASE_URL=http://localhost:3000

# List all settings (admin only)
curl -s "$BASE_URL/api/admin/settings" \
  -H "Authorization: Bearer $ADMIN_KEY"

# Update a setting
curl -s -X PATCH "$BASE_URL/api/admin/settings/DEFAULT_PAGE_SIZE" \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":20}'

# Reset database (delete all data, re-seed from JSONPlaceholder)
curl -s -X POST "$BASE_URL/api/admin/reset-database" \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'