import { http } from "@/utils/http";

/** 公告列表 */
export const getNoticeList = (params?: object) => {
  return http.request<any>("get", "/notice/list", { params });
};

/** 公告详情 */
export const getNoticeDetail = (id: number) => {
  return http.request<any>("get", `/notice/detail/${id}`);
};

/** 新增公告 */
export const addNotice = (data: object) => {
  return http.request<any>("post", "/notice/create", { data });
};

/** 修改公告 */
export const modifyNotice = (data: object) => {
  return http.request<any>("post", "/notice/modify", { data });
};

/** 删除公告 */
export const removeNotice = (id: number) => {
  return http.request<any>("post", `/notice/delete/${id}`, { data: {} });
};
