refactor the main structure

This commit is contained in:
2023-09-25 21:09:21 +02:00
parent 40385bbae2
commit 8b13c52b97
11 changed files with 57 additions and 68 deletions

9
src/api/error.rs Normal file
View File

@@ -0,0 +1,9 @@
use derive_more::{Display, Error};
impl actix_web::error::ResponseError for ReturnedError{}
#[derive(Debug, Display, Error)]
#[display(fmt = "my error: {}", name)]
pub struct ReturnedError {
pub name: String,
}