import { httpApp } from "@/plugins/axiosApp";
import { SiteMessage } from "@/types/student-client";

/** 获取消息列表 */
export async function messageListApi(
  userId: number,
  siteMessagesTimeStamp: number
) {
  return httpApp.get<any, { data: SiteMessage[] }>(
    `/api/ecs_exam_work/notice/getUserNoticeList?${userId}${siteMessagesTimeStamp}`
  );
}
/** 更新消息状态为已读 */
export async function updateNotieReadStatusApi(noticeId: string) {
  return httpApp.post<any>(
    "/api/ecs_exam_work/notice/updateNoticeReadStatus",
    null,
    {
      params: { noticeId },
    }
  );
}
