This commit is contained in:
Alex-larget
2026-03-17 18:22:06 +08:00
parent 88915276d1
commit f276595ad6
50 changed files with 2246 additions and 1223 deletions

View File

@@ -1,6 +1,7 @@
package handler
import (
"encoding/json"
"fmt"
"net/http"
"strconv"
@@ -658,6 +659,11 @@ func MiniprogramTrackPost(c *gin.Context) {
if body.Target != "" {
t.ChapterID = &chID
}
if body.ExtraData != nil {
if b, err := json.Marshal(body.ExtraData); err == nil {
t.ExtraData = b
}
}
if err := db.Create(&t).Error; err != nil {
c.JSON(http.StatusOK, gin.H{"success": false, "error": err.Error()})
return