37 lines
711 B
TypeScript
37 lines
711 B
TypeScript
"use server";
|
|
|
|
import { addAction, updateAction, deleteAction } from "@/app/_lib/actions";
|
|
|
|
export const addSignalBotAction = async (
|
|
currentState: any,
|
|
formData: FormData,
|
|
) => {
|
|
return addAction({
|
|
entity: "signal",
|
|
table: "SignalBot",
|
|
fields: ["name", "description"],
|
|
currentState,
|
|
formData,
|
|
});
|
|
};
|
|
|
|
export const updateSignalBotAction = async (
|
|
currentState: any,
|
|
formData: FormData,
|
|
) => {
|
|
return updateAction({
|
|
entity: "signal",
|
|
table: "SignalBot",
|
|
fields: ["name"],
|
|
currentState,
|
|
formData,
|
|
});
|
|
};
|
|
|
|
export const updateSignalBotAction = async (id: string) => {
|
|
return deleteAction({
|
|
entity: "facebook",
|
|
table: "FacebookBot",
|
|
id,
|
|
});
|
|
};
|