feat: polish project editing

This commit is contained in:
Matouš Volf
2024-09-07 09:53:22 +02:00
parent ecf7164d46
commit 6dcf00efe9
5 changed files with 19 additions and 23 deletions

View File

@ -1,4 +1,4 @@
pub(crate) mod error;
pub(crate) mod error_vec;
pub(crate) mod project_create_error;
pub(crate) mod task_create_error;
pub(crate) mod project_error;
pub(crate) mod task_error;

View File

@ -34,6 +34,12 @@ impl From<ValidationErrors> for ErrorVec<ProjectError> {
}
}
impl From<diesel::result::Error> for ProjectError {
fn from(_: diesel::result::Error) -> Self {
ProjectError::Error(Error::ServerInternal)
}
}
// Has to be implemented for Dioxus server functions.
impl Display for ProjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {