- Introduced "Minhas Intenções" tab visible only to logged-in users. - Integrated MyPurchaseIntentionsPanel and useMyPurchaseIntentions hook. - Added tab badge showing count of pending intentions. - Extended session API to include user’s main character for downstream features.
22 lines
456 B
TypeScript
22 lines
456 B
TypeScript
/**
|
|
* Prisma Client para PostgreSQL (Banco Principal da Aplicação)
|
|
* Usa DATABASE_URL_APP do .env
|
|
*/
|
|
|
|
import { PrismaClient } from "@prisma/client";
|
|
|
|
const globalForPrisma = globalThis as unknown as {
|
|
prisma: PrismaClient | undefined;
|
|
};
|
|
|
|
export const prisma =
|
|
globalForPrisma.prisma ??
|
|
new PrismaClient({
|
|
log: ["error"], // Apenas erros, sem queries
|
|
});
|
|
|
|
if (process.env.NODE_ENV !== "production") {
|
|
globalForPrisma.prisma = prisma;
|
|
}
|
|
|