mediahub-fe/action/app-actions.ts

13 lines
358 B
TypeScript
Raw Normal View History

2024-11-26 03:09:48 +00:00
'use server'
import { redirect } from "next/navigation";
import { revalidatePath } from "next/cache";
import { postMessage } from "@/app/[locale]/(protected)/app/chat/utils";
export const postMessageAction = async (id: string, message: string,) => {
const response = await postMessage(id, message)
revalidatePath("/");
return response;
}