同步历史版本代码

This commit is contained in:
2026-03-03 09:32:22 -08:00
parent 7d46b31866
commit 4d8516b2e1
140 changed files with 8399 additions and 489 deletions
@@ -0,0 +1,23 @@
package notify
import (
"encoding/json"
"io"
"github.com/gin-gonic/gin"
"github.com/perfect-panel/server/internal/logic/notify"
"github.com/perfect-panel/server/internal/svc"
"github.com/perfect-panel/server/pkg/result"
)
func AppleIAPNotifyHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return func(c *gin.Context) {
raw, _ := io.ReadAll(c.Request.Body)
var body map[string]interface{}
_ = json.Unmarshal(raw, &body)
sp, _ := body["signedPayload"].(string)
l := notify.NewAppleIAPNotifyLogic(c.Request.Context(), svcCtx)
err := l.Handle(sp)
result.HttpResult(c, map[string]bool{"success": err == nil}, err)
}
}