修复:goctl api 生成的代码没有在路由中加入Ipa模式
Build docker and publish / build (20.15.1) (push) Successful in 7m48s
Build docker and publish / build (20.15.1) (push) Successful in 7m48s
This commit is contained in:
@@ -19,6 +19,7 @@ func DeviceLoginHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
req.IP = c.ClientIP()
|
||||
l := auth.NewDeviceLoginLogic(c.Request.Context(), svcCtx)
|
||||
resp, err := l.DeviceLogin(&req)
|
||||
result.HttpResult(c, resp, err)
|
||||
|
||||
@@ -25,6 +25,7 @@ func TelephoneLoginHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
}
|
||||
// get client ip
|
||||
req.IP = c.ClientIP()
|
||||
req.UserAgent = c.Request.UserAgent()
|
||||
if svcCtx.Config.Verify.LoginVerify {
|
||||
verifyTurns := turnstile.New(turnstile.Config{
|
||||
Secret: svcCtx.Config.Verify.TurnstileSecret,
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
auth "github.com/perfect-panel/server/internal/handler/auth"
|
||||
authOauth "github.com/perfect-panel/server/internal/handler/auth/oauth"
|
||||
common "github.com/perfect-panel/server/internal/handler/common"
|
||||
publicIapApple "github.com/perfect-panel/server/internal/handler/public/iap/apple"
|
||||
publicAnnouncement "github.com/perfect-panel/server/internal/handler/public/announcement"
|
||||
publicDocument "github.com/perfect-panel/server/internal/handler/public/document"
|
||||
publicOrder "github.com/perfect-panel/server/internal/handler/public/order"
|
||||
@@ -733,6 +734,23 @@ func RegisterHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) {
|
||||
publicAnnouncementGroupRouter.GET("/list", publicAnnouncement.QueryAnnouncementHandler(serverCtx))
|
||||
}
|
||||
|
||||
publicIapAppleGroupRouter := router.Group("/v1/public/iap/apple")
|
||||
publicIapAppleGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))
|
||||
|
||||
{
|
||||
// Attach Apple Transaction
|
||||
publicIapAppleGroupRouter.POST("/transactions/attach", publicIapApple.AttachAppleTransactionHandler(serverCtx))
|
||||
|
||||
// Attach Apple Transaction By Id
|
||||
publicIapAppleGroupRouter.POST("/transactions/attach/id", publicIapApple.AttachAppleTransactionByIdHandler(serverCtx))
|
||||
|
||||
// Restore Apple Transactions
|
||||
publicIapAppleGroupRouter.POST("/transactions/restore", publicIapApple.RestoreAppleTransactionsHandler(serverCtx))
|
||||
|
||||
// Get Apple IAP Status
|
||||
publicIapAppleGroupRouter.GET("/status", publicIapApple.GetAppleStatusHandler(serverCtx))
|
||||
}
|
||||
|
||||
publicDocumentGroupRouter := router.Group("/v1/public/document")
|
||||
publicDocumentGroupRouter.Use(middleware.AuthMiddleware(serverCtx), middleware.DeviceMiddleware(serverCtx))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user