fix
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package agent
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"hm-server/app/main/api/internal/logic/agent"
|
||||
"hm-server/app/main/api/internal/svc"
|
||||
"hm-server/common/result"
|
||||
)
|
||||
|
||||
func GetMembershipInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := agent.NewGetMembershipInfoLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetMembershipInfo()
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
||||
@@ -639,6 +639,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/membership/info",
|
||||
Handler: agent.GetMembershipInfoHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/promotion/qrcode",
|
||||
|
||||
Reference in New Issue
Block a user