rices/test/restclient/03_update_rice.http
oscargonzalezmoreno@gmail.com d44ea66b40 feat: Add "version" and "os" fields to rice database
- The rice database now includes new fields:
  - `version`: Represents the version of the rice entry.
  - `os`: Represents the operating system associated with the rice entry.
- These fields are required for all new rice entries.

refactor: Stop uploading rice.json to GitHub
- The `rice.json` file is no longer uploaded to GitHub during rice creation or updates.
- This reduces redundancy as all metadata is now managed directly in the database (Supabase).

fix: Improve exception handling with proper HTTP status codes
- Enhanced exception handling to align with standard HTTP status codes:
  - `BadRequestException` for validation errors.
  - `ConflictException` for duplicate entries.
  - `NotFoundException` for missing resources.
  - Generic `InternalServerErrorException` for unexpected errors.
- This ensures the API returns meaningful and accurate responses.

feat: Enhance rice download to act as a standard HTTP GET
- The `findOne` method now returns the raw content of the rice file directly as the response body.
- Removes unnecessary JSON wrappers, allowing the endpoint to behave like a typical HTTP GET request.
- Improved usability for clients consuming the API.
2024-12-27 11:24:39 +01:00

19 lines
482 B
HTTP

@baseUrl = http://localhost:3000
@previous_slug = cool-zenrice-aurora-ef732cbc-fdde-4f76-b4e3-cff0ec8b6f39
@previous_token = b406f962-5c51-43a9-8382-40e0983a46e7
# {
# "key": "value",
# "description": "Example updated content"
# }
# {'key':'value','description':'Example updated content'}
PUT {{baseUrl}}/rices/{{previous_slug}}
Content-Type: application/json
x-rices-token: {{previous_token}}
{
"content": "{'key':'value','description':'Example updated content'}"
}