store: Implement a contact birthday store

This commit is contained in:
Lennart
2025-01-06 17:14:27 +01:00
parent d582d0d0d3
commit 357b115c62
5 changed files with 218 additions and 2 deletions

View File

@@ -12,6 +12,9 @@ pub enum Error {
#[error("Invalid ics/vcf input: {0}")]
InvalidData(String),
#[error("Read-only")]
ReadOnly,
#[error(transparent)]
ParserError(#[from] ical::parser::ParserError),
@@ -25,6 +28,7 @@ impl ResponseError for Error {
Self::NotFound => StatusCode::NOT_FOUND,
Self::AlreadyExists => StatusCode::CONFLICT,
Self::InvalidData(_) => StatusCode::BAD_REQUEST,
Self::ReadOnly => StatusCode::FORBIDDEN,
_ => StatusCode::INTERNAL_SERVER_ERROR,
}
}