This commit is contained in:
zhaoxiaorong 2025-04-11 17:50:06 +08:00
parent 50c23df124
commit 8060cdb508
1 changed files with 4 additions and 1 deletions

View File

@ -11,7 +11,10 @@ func New(endpoint string, data []*LogItem) error {
return nil
}
func PostLog(data []*LogItem, endpoint string) (resp *http.Response, err error) {
jsonBytes, err := json.Marshal(data)
request := map[string]any{
"data": data,
}
jsonBytes, err := json.Marshal(request)
if err != nil {
return nil, err
}