Replace route calling routes with helpers
This fixes the panic from ruma "index out of bounds"
This commit is contained in:
parent
5ccdd3694b
commit
fe795d38ea
3 changed files with 90 additions and 76 deletions
|
@ -53,11 +53,11 @@ pub async fn get_alias_route(
|
|||
db: State<'_, Database>,
|
||||
body: Ruma<get_alias::IncomingRequest>,
|
||||
) -> ConduitResult<get_alias::Response> {
|
||||
get_alias_helper(db, &body.room_alias).await
|
||||
get_alias_helper(&db, &body.room_alias).await
|
||||
}
|
||||
|
||||
pub async fn get_alias_helper(
|
||||
db: State<'_, Database>,
|
||||
db: &Database,
|
||||
room_alias: &RoomAliasId,
|
||||
) -> ConduitResult<get_alias::Response> {
|
||||
if room_alias.server_name() != db.globals.server_name() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue