Fix formatting
This commit is contained in:
@@ -3,7 +3,7 @@ import nunjucks from "nunjucks";
|
||||
import { contentTypes } from "./content-types";
|
||||
import { executionContext } from "./execution-context";
|
||||
import { httpCodes } from "./http-codes";
|
||||
import type { Result, RedirectResult } from "./types";
|
||||
import type { RedirectResult, Result } from "./types";
|
||||
|
||||
// FIXME: Handle the error here
|
||||
const loadFile = async (path: string): Promise<string> => {
|
||||
@@ -18,7 +18,7 @@ const render = async (path: string, ctx?: object): Promise<string> => {
|
||||
|
||||
const template = await loadFile(fullPath);
|
||||
|
||||
const c = ctx===undefined ? {} : ctx;
|
||||
const c = ctx === undefined ? {} : ctx;
|
||||
|
||||
const retval = nunjucks.renderString(template, c);
|
||||
|
||||
@@ -26,7 +26,7 @@ const render = async (path: string, ctx?: object): Promise<string> => {
|
||||
};
|
||||
|
||||
const html = (payload: string): Result => {
|
||||
const retval: Result = {
|
||||
const retval: Result = {
|
||||
code: httpCodes.success.OK,
|
||||
result: payload,
|
||||
contentType: contentTypes.text.html,
|
||||
|
||||
Reference in New Issue
Block a user