import request from '../../utils/request'

export function selectSystemMessages(date) {
  return request({
    url: '/socketMessage/selectSystemMessages',
    method: 'get',
    params: { date },
  })
}

export function onPageRefresh(data) {
  return request({
    url: '/socketMessage/onPageRefresh',
    method: 'post',
    data,
  })
}

export function fetchAllSenders() {
  return request({
    url: '/socketMessage/fetchAllSenders',
    method: 'get',
  })
}

export function fetchAllMessages(sender) {
  return request({
    url: '/socketMessage/fetchAllMessages',
    method: 'get',
    params: { sender },
  })
}
