This commit is contained in:
2025-12-27 11:14:07 +01:00
parent e9176ff73e
commit 13685d100c
51 changed files with 2685 additions and 1 deletions

10
src/actions/tos/getTos.ts Normal file
View File

@ -0,0 +1,10 @@
'use server';
import { prisma } from "@/lib/prisma";
export async function getLatestTos(): Promise<string | null> {
const tos = await prisma.termsOfService.findFirst({
orderBy: { createdAt: 'desc' },
});
return tos?.markdown ?? null;
}

View File

@ -0,0 +1,11 @@
'use server';
import { prisma } from "@/lib/prisma";
export async function saveTosAction(markdown: string) {
await prisma.termsOfService.create({
data: {
markdown,
},
});
}