Files
var-monorepo/apps/hub/app/(app)/admin/config/action.tsx
PxlLoewe a9d20e018d #45
2025-07-06 00:36:48 -07:00

23 lines
433 B
TypeScript

"use server";
import { prisma, Prisma } from "@repo/db";
export const addMessage = async (notam: Prisma.ConfigCreateInput) => {
try {
await prisma.config.create({
data: notam,
});
} catch (error) {
throw new Error("Failed to add message");
}
};
export const disableMessage = async () => {
try {
await prisma.config.create({
data: {},
});
} catch (error) {
throw new Error("Failed to disable message");
}
};