mediahub-fe/action/app-actions.ts

12 lines
285 B
TypeScript

'use server'
import { redirect } from "next/navigation";
import { revalidatePath } from "next/cache";
export const postMessageAction = async (id: string, message: string,) => {
const response = await postMessage(id, message)
revalidatePath("/");
return response;
}