Files
honoka-chan/handler/personalnotice.go
T
YumeMichi 70398da4b9 Cleanup
Signed-off-by: Yuan Si <do4suki@gmail.com>
2025-03-10 15:29:29 +08:00

31 lines
592 B
Go

package handler
import (
"encoding/json"
"honoka-chan/model"
"net/http"
"time"
"github.com/gin-gonic/gin"
)
func PersonalNotice(ctx *gin.Context) {
noticeResp := model.PersonalNoticeResp{
ResponseData: model.PersonalNoticeRes{
HasNotice: false,
NoticeID: 0,
Type: 0,
Title: "",
Contents: "",
ServerTimestamp: time.Now().Unix(),
},
ReleaseInfo: []any{},
StatusCode: 200,
}
resp, err := json.Marshal(noticeResp)
CheckErr(err)
ctx.Header("X-Message-Sign", GenXMS(resp))
ctx.String(http.StatusOK, string(resp))
}