package monitor

import (
	"github.com/gin-gonic/gin"
	"server/model/common/response"
)

type PlayBackApi struct{}

func (p PlayBackApi) RewindText(c *gin.Context) {
	streamId := c.Query("streamId")
	date := c.Query("date")
	operate, err := PlayBackService.GetRewindText(streamId, date)
	if err != nil {
		response.FailWithMessage("请求文件链接接口错误", c)
	}
	if operate == "" {
		response.FailWithMessage("无数据", c)
		return
	}
	response.OkWithDetailed(operate, "获取成功", c)
}
