mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: Missing suspensions shouldn't error
Turns out copying and pasting the function above verbatim actually introduces more problems than it solves!
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{collections::BTreeMap, mem, sync::Arc};
|
|||||||
|
|
||||||
use conduwuit::{
|
use conduwuit::{
|
||||||
Err, Error, Result, Server, at, debug_warn, err, trace,
|
Err, Error, Result, Server, at, debug_warn, err, trace,
|
||||||
utils::{self, ReadyExt, stream::TryIgnore, string::Unquoted},
|
utils::{self, ReadyExt, TryFutureExtExt, stream::TryIgnore, string::Unquoted},
|
||||||
};
|
};
|
||||||
use database::{Deserialized, Ignore, Interfix, Json, Map};
|
use database::{Deserialized, Ignore, Interfix, Json, Map};
|
||||||
use futures::{Stream, StreamExt, TryFutureExt};
|
use futures::{Stream, StreamExt, TryFutureExt};
|
||||||
@@ -176,8 +176,7 @@ impl Service {
|
|||||||
self.db
|
self.db
|
||||||
.userid_suspended
|
.userid_suspended
|
||||||
.get(user_id)
|
.get(user_id)
|
||||||
.map_ok(|val| !val.is_empty())
|
.map_ok_or(Ok(false), |_| Ok(true))
|
||||||
.map_err(|_| err!(Request(NotFound("User does not exist."))))
|
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user