Skip to content

Commit

Permalink
/advance_pointer: defer before processing
Browse files Browse the repository at this point in the history
  • Loading branch information
laggycomputer committed Sep 14, 2024
1 parent ebac1ef commit 8f396b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/maint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub(crate) async fn advance_pointer(
ctx: Context<'_>,
#[description = "do not approve this event number and after"] stop_before: Option<EventNumber>,
) -> Result<(), BotError> {
ctx.defer().await?;

let LeagueInfo { first_unreviewed_event_number, .. } = ctx.data().mongo
.collection::<LeagueInfo>("league_info")
.find_one(doc! {})
Expand Down

0 comments on commit 8f396b3

Please sign in to comment.