import ajax from "@/utils/request";

export const getNewsList = async (params) =>
  ajax(`/news/getNewsList`, "POST", params);

export const getNews = async (id) =>
  ajax(`/news/getNews`, "GET", { id });

export const deleteNews = async (id) =>
  ajax(`/news/deleteNews`, "GET", { id });

export const updateNews = async (params) =>
  ajax(`/news/updateNews`, "POST", params);

export const addNews = async (params) =>
  ajax(`/news/addNews`, "POST", params);
