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| {
|
||||
|
||||
Reference in New Issue
Block a user