Spaces:
Sleeping
Sleeping
Download manual/admin.sh from dangkhoa2016/Nodejs-JSON-API-Server: direct link, hf CLI and curl.
- Browser
- Download file 596 Bytes
-
https://huggingface.co/spaces/dangkhoa2016/Nodejs-JSON-API-Server/resolve/main/manual/admin.sh
- Command line
-
hf download hf://spaces/dangkhoa2016/Nodejs-JSON-API-Server/manual/admin.sh
-
curl -L -o admin.sh https://huggingface.co/spaces/dangkhoa2016/Nodejs-JSON-API-Server/resolve/main/manual/admin.sh
596 Bytes
| 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}' | |