"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");
	}
};
