Add some stub user stuff

This commit is contained in:
2026-01-03 17:06:54 -06:00
parent c926f15aab
commit e136c07928
3 changed files with 44 additions and 1 deletions

View File

@@ -59,6 +59,29 @@ const routes: Route[] = [
};
},
},
{
path: "/whoami",
methods: ["GET"],
handler: async (_call: Call): Promise<Result> => {
const me = services.session.getUser();
const template = `
<html>
<head></head>
<body>
{{ me }}
</body>
</html>
`;
const result = nunjucks.renderString(template, { me });
return {
code: httpCodes.success.OK,
contentType: contentTypes.text.html,
result,
};
},
},
{
path: "/ok",
methods: ["GET", "POST", "PUT"],