Commit graph

26 commits

Author SHA1 Message Date
compilando
079cde591e shared refactor 2025-02-25 20:30:00 +01:00
mr. M
49b7ba2c78
fix(rices): remove duplicate comment in HTML response 2024-12-30 07:51:10 +01:00
mr. M
d5f39678c4
feat(rices): refactor rice metadata retrieval and enhance HTML response 2024-12-30 07:41:20 +01:00
mr. m
aa45364f4d
Update .env.example
Signed-off-by: mr. m  <91018726+mr-cheff@users.noreply.github.com>
2024-12-29 15:41:57 +01:00
oscargonzalezmoreno@gmail.com
c4d83be80b fix zenrices download method 2024-12-28 19:40:03 +01:00
oscargonzalezmoreno@gmail.com
aaee70f6df Upload size control and security improvements
- Limit the maximum upload file size to 500 KB.
- Minify CSS in the `userChrome` and `userContent` fields.
- Sanitize uploaded JSON to remove XSS references (create and update).
2024-12-28 17:42:17 +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
oscargonzalezmoreno@gmail.com
55fa0b747f Merge remote-tracking branch 'origin/develop' into develop 2024-12-28 12:21:48 +01:00
oscargonzalezmoreno@gmail.com
4bb19e8180 fix .gitignore 2024-12-28 12:21:20 +01:00
mr. M
4590c34ea2
fix: update user agent regex for improved matching 2024-12-27 16:50:24 +01:00
mr. M
8e280426f7
fix: improve user agent validation and error messages 2024-12-27 16:23:57 +01:00
mr. M
50773b2f0e
chore: update package-lock.json and refine User-Agent description in RicesController 2024-12-27 14:55:58 +01:00
mr. M
327953fa64
refactor: remove unnecessary comments from GitHub module 2024-12-27 13:04:20 +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
c8ce6e7637 Merge remote-tracking branch 'origin/develop' into develop 2024-12-27 11:24:58 +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
mr. m
556cd5e127
Update setup.ts
Signed-off-by: mr. m  <91018726+mr-cheff@users.noreply.github.com>
2024-12-26 09:47:16 -08:00
oscargonzalezmoreno@gmail.com
def257b9ba Merge remote-tracking branch 'origin/develop' into develop 2024-12-26 18:32:26 +01:00
oscargonzalezmoreno@gmail.com
96b3c4f8b5 fix base64 issues 2024-12-26 18:31:57 +01:00
mr. m
e854508b34
Created a LICENSE
Signed-off-by: mr. m  <91018726+mr-cheff@users.noreply.github.com>
2024-12-26 18:31:29 +01:00
oscargonzalezmoreno@gmail.com
37586abe97 supabase persistence and multiple api fixes 2024-12-26 18:06:42 +01:00
mr. M
ff50da2afd
Add throttling configurations for short, medium, and long requests 2024-12-26 01:06:47 +01:00
Mr Cheff
232d8b37d6
first commit 2024-12-26 00:58:36 +01:00