Load a list of clients

This commit is contained in:
2022-04-06 17:18:06 +02:00
parent f6403afa34
commit da6a494875
14 changed files with 184 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
use std::future::Future;
use std::ops::Deref;
use std::pin::Pin;
use actix::Addr;
@@ -19,6 +20,14 @@ impl From<CurrentUser> for User {
}
}
impl Deref for CurrentUser {
type Target = User;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl FromRequest for CurrentUser {
type Error = Error;
type Future = Pin<Box<dyn Future<Output=Result<Self, Self::Error>>>>;