Database changes to make it better practise

This commit is contained in:
2026-04-02 01:32:08 +02:00
parent 5d7e045764
commit 314a26325f
36 changed files with 1453 additions and 193 deletions

View File

@@ -1,6 +1,5 @@
import { Router } from 'express';
import { getUserById } from '../cqrs';
import { rowToServer } from '../cqrs/mappers';
import { ServerPayload } from '../cqrs/types';
import { getActiveServerInvite } from '../services/server-access.service';
import {
@@ -283,7 +282,7 @@ invitesApiRouter.get('/:id', async (req, res) => {
return res.status(404).json({ error: 'Invite link has expired or is invalid', errorCode: 'INVITE_EXPIRED' });
}
const server = rowToServer(bundle.server);
const server = bundle.server;
res.json({
id: bundle.invite.id,
@@ -315,7 +314,7 @@ invitePageRouter.get('/:id', async (req, res) => {
return;
}
const server = rowToServer(bundle.server);
const server = bundle.server;
const owner = await getUserById(server.ownerId);
res.send(renderInvitePage({