mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-15 13:32:28 +00:00
Fix appservice transactions throwing errors
We weren't awaiting the appservice, so the truthy check passes and we get "cannot read property id of undefined" in the REST handler.
This commit is contained in:
parent
51810cce8f
commit
bebcfa1bba
@ -26,7 +26,7 @@ export class AppserviceStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async getByHomeserverToken(hsToken: string): Promise<AppService> {
|
public static async getByHomeserverToken(hsToken: string): Promise<AppService> {
|
||||||
const appservice = AppService.findOne({where: {hsToken: hsToken}});
|
const appservice = await AppService.findOne({where: {hsToken: hsToken}});
|
||||||
if (!appservice) throw new Error("Appservice not found");
|
if (!appservice) throw new Error("Appservice not found");
|
||||||
return appservice;
|
return appservice;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user