Add update and get-by-tag for schedules

This commit is contained in:
Tobias Reisinger 2022-04-03 18:39:31 +02:00
parent 2af71a8d84
commit e157a5d02d
10 changed files with 107 additions and 18 deletions
src/db

View file

@ -10,6 +10,7 @@ pub enum DatabaseError {
InsertGetError,
NotFound,
Protected,
UpdateError(diesel::result::Error),
}
impl DatabaseError {
@ -45,6 +46,7 @@ impl From<&DatabaseError> for String {
DatabaseError::NotFound => String::from("model was not found in database"),
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"),
}
}
}