Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axum API: fix errors and minor refactorings #206

Merged
merged 8 commits into from
Jun 19, 2023
Merged

Axum API: fix errors and minor refactorings #206

merged 8 commits into from
Jun 19, 2023

Conversation

josecelano
Copy link
Member

Before enabling Auxm API, there are some minor changes and fixes to do.

Response after deleting a tag should be:

```
{
  data: 1
}
```

not:

```
{
  data: "1"
}
```

where 1 (`i64`) is the tag ID.
The application allows adding empty categories. The test cannot be
executed in a shared env because it would fail the second tie is
executed becuase the category already exists.
If the handlers return an error Axum does not automatically return an
error HTTP code. See
https://docs.rs/axum/latest/axum/error_handling/index.html. You have to
convert the error into an error response.
This function could be used by many other handlers.
We are going to remove the ActixWeb implementation after enabling the
new Axum implementaion. WE are moving generic things in ActixWeb
implementations that are not going to be removed.
It's been used also in Axum implementation and ActixWeb implementation
will be removed.
It depends on the web framework (request).
@josecelano josecelano merged commit a662f9c into torrust:develop Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant