fix(server): use correct error type

This commit is contained in:
Anna 2022-08-26 03:51:25 -04:00
parent 8180671f5d
commit 23cd9de97e
1 changed files with 2 additions and 1 deletions

View File

@ -450,7 +450,7 @@ fn contribute_multiple(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
warp::post().and(route).boxed()
}
async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> mongodb::error::Result<UpdateResult> {
async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> Result<UpdateResult> {
if listing.created_world >= 1_000 || listing.home_world >= 1_000 || listing.current_world >= 1_000 {
anyhow::bail!("invalid listing");
}
@ -482,4 +482,5 @@ async fn insert_listing(state: &State, mut listing: PartyFinderListing) -> mongo
opts,
)
.await
.context("could not insert record")
}