keyword admin page

This commit is contained in:
PxlLoewe
2025-03-26 00:12:22 -07:00
parent 2b1fd83a97
commit 9551202370
9 changed files with 361 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
"use server";
import { prisma, Prisma, Station } from "@repo/db";
export const upsertKeyword = async (
station: Prisma.StationCreateInput,
id?: Station["id"],
) => {
const newStation = id
? await prisma.station.update({
where: { id: id },
data: station,
})
: await prisma.station.create({ data: station });
return newStation;
};
export const deleteStation = async (id: Station["id"]) => {
await prisma.station.delete({ where: { id: id } });
};