import axios from "../axios.js";

export const sendMessage = async (values) => {
  try {
    const { data } = await axios({
      method: "POST",
      url: "notifications/send-messages",
      data: values,
    });

    if (!data || !data?.data) {
      console.log("❌ UPDATE FAILURE (UPDATE Noti)");
      return null;
    }

    return data.data;
  } catch (error) {
    console.log("❌ ERROR IN SERVER: (UPDATE Noti) ", error.response);
    return null;
  }
};
