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