chore: seperate into packages

This commit is contained in:
Morten Olsen
2025-12-10 10:26:14 +01:00
parent f9494c88e2
commit d02102977a
40 changed files with 753 additions and 1175 deletions

View File

@@ -1,8 +1,6 @@
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
import { z } from 'zod';
import { DatabaseService } from '#root/services/database/database.js';
const systemEndpoints: FastifyPluginAsyncZod = async (instance) => {
instance.route({
method: 'GET',
@@ -18,9 +16,8 @@ const systemEndpoints: FastifyPluginAsyncZod = async (instance) => {
},
},
handler: async (_, reply) => {
const { services } = instance;
const databaseService = services.get(DatabaseService);
const db = await databaseService.getInstance();
const { runtime } = instance;
const db = await runtime.database.getInstance();
await db.raw('SELECT 1=1');
await reply.send({
status: 'ok',