Skip to content

Commit

Permalink
better documentation/logging
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Jan 17, 2024
1 parent b2d4a15 commit 33502c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/main-api/src/calendar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ async fn get_events_from_db(

#[derive(Deserialize, Debug)]
pub struct QueryArguments {
/// eg. 2039-01-19T03:14:07
/// eg. 2039-01-19T03:14:07+1
start_after: DateTime<Local>,
/// eg. 2042-01-07T00:00:00
/// eg. 2042-01-07T00:00:00 UTC
end_before: DateTime<Local>,
}

Expand Down Expand Up @@ -166,13 +166,13 @@ pub async fn calendar_handler(
{
Ok(res) => (*last_sync, res),
Err(e) => {
error!("could substitute from db {e:?}");
error!("could not get substitute from db due to {e:?}");
return HttpResponse::InternalServerError()
.body("could not get calendar entrys, please try again later");
}
}
} else {
error!("could substitute from db {e:?}");
error!("cannot get substitute from db due to staleness");
return HttpResponse::InternalServerError()
.body("could not get calendar entrys, please try again later");
}
Expand Down

0 comments on commit 33502c0

Please sign in to comment.