refactor for ruma identifiers optimizations
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d91570d0e6
commit
0a9b6c136f
19 changed files with 81 additions and 88 deletions
|
@ -18,7 +18,7 @@ use ruma::{
|
|||
},
|
||||
uiaa::UserIdentifier,
|
||||
},
|
||||
UserId,
|
||||
OwnedUserId, UserId,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
|
@ -83,7 +83,7 @@ pub(crate) async fn login_route(
|
|||
services.globals.server_name(),
|
||||
)
|
||||
} else if let Some(user) = user {
|
||||
UserId::parse(user)
|
||||
OwnedUserId::parse(user)
|
||||
} else {
|
||||
warn!("Bad login type: {:?}", &body.login_info);
|
||||
return Err!(Request(Forbidden("Bad login type.")));
|
||||
|
@ -147,7 +147,7 @@ pub(crate) async fn login_route(
|
|||
services.globals.server_name(),
|
||||
)
|
||||
} else if let Some(user) = user {
|
||||
UserId::parse(user)
|
||||
OwnedUserId::parse(user)
|
||||
} else {
|
||||
warn!("Bad login type: {:?}", &body.login_info);
|
||||
return Err(Error::BadRequest(ErrorKind::forbidden(), "Bad login type."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue