Separate happy path utility functions for requests

This commit is contained in:
2026-01-17 15:43:52 -06:00
parent 03cc4cf4eb
commit 7ed05695b9
6 changed files with 64 additions and 37 deletions

View File

@@ -5,6 +5,17 @@ import { getCurrentUser } from "../context";
import { db, migrate, migrationStatus, PostgresAuthStore } from "../database";
import { getLogs, log } from "../logging";
import type { MaybeUser } from "../user";
import nunjucks from 'nunjucks'
const conf = {
templateEngine: () => {
return {
renderTemplate: (template: string, context: object) => {
return nunjucks.renderString(template, context);
},
}
}
};
const database = {
db,
@@ -42,6 +53,7 @@ const auth = new AuthService(authStore);
// Keep this asciibetically sorted
const services = {
auth,
conf,
database,
logging,
misc,