Add much stuff for rewrite

This commit is contained in:
Tobias Reisinger 2023-11-19 18:54:27 +01:00
parent 4261141c3a
commit bd44dc3183
37 changed files with 1356 additions and 2551 deletions
src/db

View file

@ -11,6 +11,7 @@ pub enum DatabaseError {
NotFound,
Protected,
UpdateError(diesel::result::Error),
Unknown,
}
impl DatabaseError {
@ -47,6 +48,7 @@ impl From<&DatabaseError> for String {
DatabaseError::DeleteError => String::from("error on deleting from database"),
DatabaseError::Protected => String::from("model is protected"),
DatabaseError::UpdateError(_) => String::from("error on updating the model"),
DatabaseError::Unknown => String::from("unknown error"),
}
}
}