Add some stub user stuff
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user