Files
honoka-chan/internal/handler/gdpr.go
T
2025-08-05 20:06:35 +08:00

29 lines
541 B
Go

package handler
import (
"encoding/json"
"honoka-chan/internal/model"
"honoka-chan/internal/utils"
"net/http"
"time"
"github.com/gin-gonic/gin"
)
func Gdpr(ctx *gin.Context) {
gdprResp := model.GdprResp{
ResponseData: model.GdprRes{
EnableGdpr: true,
IsEea: false,
ServerTimestamp: time.Now().Unix(),
},
ReleaseInfo: []any{},
StatusCode: 200,
}
resp, err := json.Marshal(gdprResp)
utils.CheckErr(err)
ctx.Header("X-Message-Sign", utils.GenXMS(resp))
ctx.String(http.StatusOK, string(resp))
}