feat: refactor database client types and update related logic across game engine modules

This commit is contained in:
2025-12-30 12:40:55 +00:00
parent 4de688d642
commit cc78319948
10 changed files with 560 additions and 117 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import fastify from 'fastify';
import cors from '@fastify/cors';
import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify';
import type { PrismaClient } from '@prisma/client';
import {
createPostgresConnector,
createRedisConnector,
@@ -24,7 +25,9 @@ export const createGatewayApiServer = async () => {
await postgres.connect();
await redis.connect();
const users = createPostgresUserRepository(postgres.prisma);
const users = createPostgresUserRepository(
postgres.prisma as PrismaClient
);
const sessions = new RedisGatewaySessionService(redis.client, {
keyPrefix: config.redisKeyPrefix,
sessionTtlSeconds: config.sessionTtlSeconds,