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

28 lines
490 B
Go

package handler
import (
"encoding/json"
"honoka-chan/model"
"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)
CheckErr(err)
ctx.Header("X-Message-Sign", GenXMS(resp))
ctx.String(http.StatusOK, string(resp))
}