fix: Convert TemplateEngine to AsyncHandlers

This commit is contained in:
Wannes Kerckhove
2022-06-30 11:36:19 +02:00
committed by Joachim Van Herwegen
parent a3c7baf6d3
commit cf74ce3d2a
43 changed files with 484 additions and 321 deletions

View File

@@ -76,7 +76,7 @@ export class SetupHttpHandler extends OperationHttpHandler {
* Returns the HTML representation of the setup page.
*/
private async handleGet(operation: Operation): Promise<ResponseDescription> {
const result = await this.templateEngine.render({});
const result = await this.templateEngine.handleSafe({ contents: {}});
const representation = new BasicRepresentation(result, operation.target, TEXT_HTML);
return new OkResponseDescription(representation.metadata, representation.data);
}