wangshan преди 3 години
родител
ревизия
8a5292e79b
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      jyBXSubscribe/api/bxsubscribe.api
  2. 1 1
      jyBXSubscribe/api/internal/handler/routes.go
  3. 1 1
      jyBXSubscribe/api/internal/types/types.go

+ 2 - 2
jyBXSubscribe/api/bxsubscribe.api

@@ -27,7 +27,7 @@ type (
 	//
 	someInfoReq {
 		AppId    string `json:"appId"`
-		UserType string `json:"userType"`
+		UserType string `path:"userType"`
 	}
 	//
 	commonResp {
@@ -40,5 +40,5 @@ service bxsubscribe-api {
 	@handler subscribeList
 	post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
 	@handler someInfo
-	post /jybx/subscribe/someInfo(someInfoReq) returns (commonResp)
+	post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
 }

+ 1 - 1
jyBXSubscribe/api/internal/handler/routes.go

@@ -19,7 +19,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/jybx/subscribe/someInfo",
+				Path:    "/jybx/subscribe/:userType/someInfo",
 				Handler: someInfoHandler(serverCtx),
 			},
 		},

+ 1 - 1
jyBXSubscribe/api/internal/types/types.go

@@ -19,7 +19,7 @@ type SubscribeReq struct {
 
 type SomeInfoReq struct {
 	AppId    string `json:"appId"`
-	UserType string `json:"userType"`
+	UserType string `path:"userType"`
 }
 
 type CommonResp struct {