Add update and get-by-tag for schedules
This commit is contained in:
parent
2af71a8d84
commit
e157a5d02d
10 changed files with 107 additions and 18 deletions
src/db
|
@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue