Release Notes: API MuscleLib v1.1.2
Bug Fix in Search Endpoint
-
Identified Issue:
A bug in the/api/exercises/search
endpoint caused failures when processing search queries due to an undefined variable (formattedExercises
), leading to inconsistent API responses. -
Fix Implemented:
- The issue was resolved by replacing
formattedExercises
with the correct variable name (matchedExercises
), ensuring that search results are returned as expected.
- The issue was resolved by replacing
Localized Logs (EN and PT)
-
Improvement Added:
The API now adapts its error logs and internal messages to the language specified in thelang
parameter (en
orpt
).- If
lang=en
: Logs are displayed in English. - If
lang=pt
: Logs are displayed in Portuguese.
- If
-
Benefits:
- Easier error interpretation for developers in different languages.
- Improved consistency with the language used in the API requests.
Updated Usage Example
-
Search Request:
GET https://libapi.vercel.app/api/exercises/search?lang=pt&query=crucifix
-
Corresponding Log:
- PT:
Nenhum exercício encontrado para o termo: crucifix
- EN:
No exercises found for the term: crucifix
- PT:
This update enhances the developer experience by providing clearer logs and resolving a critical issue in the search endpoint.