package com.ym.controller;

import com.ym.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/history")
public class HistoryController{

    @Autowired
    MessageService messageService;

    @RequestMapping(value = "/get", method = RequestMethod.POST)
    public Object get(String date) throws Exception {
        return messageService.historyGet(date);
    }

    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    public Object remove(String date) throws Exception {
        return messageService.historyRemove(date);
    }
}
