mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-30 18:04:29 +02: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:
parent
72f8cb3038
commit
eb2e3b3bb7
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue