more moves

This commit is contained in:
nora 2024-08-25 23:34:33 +02:00
parent 8a627949a3
commit 362d8c57ce
16 changed files with 164 additions and 175 deletions

View file

@ -26,7 +26,10 @@ pub enum AuthError {
impl UserPublicKey {
/// Blocking!
pub async fn for_user_and_key(user: String, provided_key: &PublicKey) -> Result<Self, AuthError> {
pub async fn for_user_and_key(
user: String,
provided_key: &PublicKey,
) -> Result<Self, AuthError> {
let user = tokio::task::spawn_blocking(move || {
users::get_user_by_name(&user).ok_or(AuthError::UnknownUser)
})