Separate happy path utility functions for requests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user