f
This commit is contained in:
22
app/main/api/internal/handler/pay/xpaypushhandler.go
Normal file
22
app/main/api/internal/handler/pay/xpaypushhandler.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package pay
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"qnc-server/app/main/api/internal/logic/pay"
|
||||
"qnc-server/app/main/api/internal/svc"
|
||||
)
|
||||
|
||||
func XpayPushHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
l := pay.NewXpayPushLogic(svcCtx)
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
l.HandleGET(w, r)
|
||||
case http.MethodPost:
|
||||
l.HandlePOST(w, r)
|
||||
default:
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user