package controllers

import (
	"hongze/hongze_open_api/services"
)

type DayNewController struct {
	BaseCommon
}

// RefreshMsg
// @Title 手动刷新企业微信群消息
// @Description 手动刷新
// @router /refresh [get]
func (c *DayNewController) RefreshMsg() {
	err := services.DayNewWeworkMsgRefresh()
	if err != nil {
		c.FailWithMessage("刷新失败, " + err.Error())
		return
	}
	c.Ok()
}

// TranslateContent
// @Title 手动翻译内容
// @Description 手动翻译内容
// @router /translate [get]
func (c *DayNewController) TranslateContent() {
	err := services.DayNewTranslateContent()
	if err != nil {
		c.FailWithMessage("翻译失败, " + err.Error())
		return
	}
	c.Ok()
}