Axum API: fix errors and minor refactorings#206
Merged
josecelano merged 8 commits intotorrust:developfrom Jun 19, 2023
josecelano:axum-api-refactorings
Merged
Axum API: fix errors and minor refactorings#206josecelano merged 8 commits intotorrust:developfrom josecelano:axum-api-refactorings
josecelano merged 8 commits intotorrust:developfrom
josecelano:axum-api-refactorings
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before enabling Auxm API, there are some minor changes and fixes to do.