Add REST endpoint for slot

This commit is contained in:
Simon Goller 2024-05-02 23:25:04 +02:00
parent 82e89baeeb
commit 8f378472ea
28 changed files with 1925 additions and 28 deletions

View file

@ -4,7 +4,8 @@ use async_trait::async_trait;
use mockall::automock;
use thiserror::Error;
mod permission;
pub mod permission;
pub mod slot;
pub use permission::MockPermissionDao;
pub use permission::PermissionDao;
@ -15,7 +16,16 @@ pub use permission::UserEntity;
#[derive(Error, Debug)]
pub enum DaoError {
#[error("Database query error: {0}")]
DatabaseQueryError(#[from] Box<dyn std::error::Error>),
DatabaseQueryError(#[from] Box<dyn std::error::Error + Send + Sync>),
#[error("Uuid error: {0}")]
UuidError(#[from] uuid::Error),
#[error("Invalid day of week number: {0}")]
InvalidDayOfWeek(u8),
#[error("Date/Time parse error: {0}")]
DateTimeParseError(#[from] time::error::Parse),
}
#[automock]