Can generate calendars
This commit is contained in:
@ -61,6 +61,15 @@ pub async fn get_by_id(
|
||||
})
|
||||
}
|
||||
|
||||
/// Get a single calendar by its token
|
||||
pub async fn get_by_token(token: &str) -> anyhow::Result<AccommodationReservationCalendar> {
|
||||
db_connection::execute(|conn| {
|
||||
accommodations_reservations_cals_urls::table
|
||||
.filter(accommodations_reservations_cals_urls::dsl::token.eq(token))
|
||||
.get_result(conn)
|
||||
})
|
||||
}
|
||||
|
||||
/// Delete a calendar
|
||||
pub async fn delete(r: AccommodationReservationCalendar) -> anyhow::Result<()> {
|
||||
db_connection::execute(|conn| {
|
||||
|
@ -129,9 +129,9 @@ pub async fn update_membership(membership: &Membership) -> anyhow::Result<()> {
|
||||
#[derive(serde::Serialize)]
|
||||
pub struct FamilyMember {
|
||||
#[serde(flatten)]
|
||||
membership: Membership,
|
||||
user_name: String,
|
||||
user_mail: String,
|
||||
pub membership: Membership,
|
||||
pub user_name: String,
|
||||
pub user_mail: String,
|
||||
}
|
||||
|
||||
/// Get information about the users of a family
|
||||
|
Reference in New Issue
Block a user