Commit graph

13 commits

Author SHA1 Message Date
compilando
f05fd437aa spaces storage 2025-02-26 17:36:53 +01:00
compilando
079cde591e shared refactor 2025-02-25 20:30:00 +01:00
oscargonzalezmoreno@gmail.com
c4d83be80b fix zenrices download method 2024-12-28 19:40:03 +01:00
oscargonzalezmoreno@gmail.com
9bf1fe8e0d feat(rices): mejorar reglas de publicación de rices
- Permitir publicar un rice con un token existente si no excede el límite.
- Configurar límite de 5 rices por token a través de variable de entorno (env.MAX_RICES_BY_TOKEN).
- Validar duplicidad de nombres al crear un nuevo rice.
2024-12-28 15:56:51 +01:00
oscargonzalezmoreno@gmail.com
612e27a55c fix user-agent update bug
fix remove extra base64 encoding
fix update http tests
2024-12-28 12:48:32 +01:00
mr. M
8e280426f7
fix: improve user agent validation and error messages 2024-12-27 16:23:57 +01:00
oscargonzalezmoreno@gmail.com
2b8909c17f feat: enhance slug generation and validation
- Add robust error handling for `generateSlug`, throwing `BadRequestException` on invalid input.
- Improve error messages to provide clearer feedback in case of failures.
2024-12-27 12:57:14 +01:00
oscargonzalezmoreno@gmail.com
6609122f8a fix no name and author in update 2024-12-27 12:34:41 +01:00
oscargonzalezmoreno@gmail.com
121ccadf57 - Changed create and update method. Headers+body instead of DTO
- Added token validation for `update` and `remove` operations to ensure it matches the record in the database.
- Ensured `name` and `author` from headers in `update` are validated against the existing record.
- Improved error handling for mismatched or missing tokens, returning appropriate HTTP status codes.
2024-12-27 12:30:50 +01:00
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
oscargonzalezmoreno@gmail.com
96b3c4f8b5 fix base64 issues 2024-12-26 18:31:57 +01:00
oscargonzalezmoreno@gmail.com
37586abe97 supabase persistence and multiple api fixes 2024-12-26 18:06:42 +01:00
Mr Cheff
232d8b37d6
first commit 2024-12-26 00:58:36 +01:00