Add booking dao implementations

This commit is contained in:
Simon Goller 2024-05-07 18:19:00 +02:00
parent 4bca60a23c
commit 71c1432fd1
10 changed files with 225 additions and 13 deletions

View file

@ -5,6 +5,7 @@ mod sales_person;
mod slot;
use axum::{body::Body, response::Response, Router};
use service::ServiceError;
use thiserror::Error;
use uuid::Uuid;
@ -124,6 +125,10 @@ fn error_handler(result: Result<Response, RestError>) -> Response {
.body(Body::new(err.to_string()))
.unwrap()
}
Err(RestError::ServiceError(ServiceError::InternalError)) => Response::builder()
.status(500)
.body(Body::new("Internal server error".to_string()))
.unwrap(),
}
}