Skip to content

Commit

Permalink
Merge branch 'feat/push-demo' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sjatsh committed Dec 1, 2023
2 parents c371bad + 94f5ae0 commit 28ca040
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions http_server/handle/pusher_user_auth.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package handle

import (
"github.com/gin-gonic/gin"
"net/http"
)

func (h *HttpHandle) PusherUserAuth(ctx *gin.Context) {
body := make(map[string]interface{})
if err := ctx.BindJSON(&body); err != nil {
ctx.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
log.Info("PusherUserAuth", "body", body)
ctx.JSON(http.StatusOK, gin.H{"status": "ok"})
}
1 change: 1 addition & 0 deletions http_server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (h *HttpServer) initRouter() {
v1.POST("/approval/fulfill", api_code.DoMonitorLog("approval_fulfill"), h.H.ApprovalFulfill)
v1.POST("/coupon/order/create", api_code.DoMonitorLog("coupon_order_create"), h.H.CheckPermissions, h.H.CouponOrderCreate)
v1.POST("/signin", api_code.DoMonitorLog("signin"), h.H.SignIn)
v1.POST("/pusher/user-auth", api_code.DoMonitorLog("pusher_user_auth"), h.H.PusherUserAuth)
}

internalV1 := h.internalEngine.Group("v1")
Expand Down

0 comments on commit 28ca040

Please sign in to comment.