From 213cc3614951c8901db8f4dac2a569f4ca4d2f2c Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 28 Jun 2024 20:39:34 +0800 Subject: [PATCH] by Robin at 20240628 --- app/mix/controller/hvyogo_api.go | 8 ++------ app/mix/controller/init.go | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/mix/controller/hvyogo_api.go b/app/mix/controller/hvyogo_api.go index c98fa5ee..2970d0f3 100644 --- a/app/mix/controller/hvyogo_api.go +++ b/app/mix/controller/hvyogo_api.go @@ -45,9 +45,7 @@ func ApiHvyogoWorkerFindDetail(ctx *gin.Context) { return } - ctx.Set("pending_data", data) - ctx.Next() - //ReplyOk(ctx, data) + ReplyOk(ctx, data) } func ApiHvyogoSingleDistribute(ctx *gin.Context) { @@ -85,7 +83,5 @@ func ApiHvyogoWorkerUpdate(ctx *gin.Context) { return } - ctx.Set("pending_data", data) - ctx.Next() - //ReplyOk(ctx, data) + ReplyOk(ctx, data) } diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index d169421c..8f75644b 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -265,9 +265,9 @@ func Init(r *gin.Engine) { // 慧用工 apiHvyogoGroup := r.Group("/api/hvyogo") apiHvyogoGroup.POST("query_agree_state", middleware.JSONParamValidator(hvyogoproto.ApiQueryAgreeStateReq{}), middleware.JwtAuthenticator(), ApiHvyogoQueryAgreeState) - apiHvyogoGroup.POST("worker_find_detail", middleware.JSONParamValidator(hvyogoproto.ApiWorkerFindDetailReq{}), middleware.JwtAuthenticator(), ApiHvyogoWorkerFindDetail, middleware.ResponseEncryptor(), middleware.JsonEncoder()) + apiHvyogoGroup.POST("worker_find_detail", middleware.JSONParamValidator(hvyogoproto.ApiWorkerFindDetailReq{}), middleware.JwtAuthenticator(), ApiHvyogoWorkerFindDetail) apiHvyogoGroup.POST("single_distribute", middleware.JSONParamValidator(hvyogoproto.ApiSingleDistributeReq{}), middleware.JwtAuthenticator(), middleware.RequestDecryptor(), ApiHvyogoSingleDistribute) - apiHvyogoGroup.POST("worker_update", middleware.JSONParamValidator(hvyogoproto.ApiWorkerUpdateReq{}), middleware.JwtAuthenticator(), middleware.RequestDecryptor(), ApiHvyogoWorkerUpdate, middleware.ResponseEncryptor(), middleware.JsonEncoder()) + apiHvyogoGroup.POST("worker_update", middleware.JSONParamValidator(hvyogoproto.ApiWorkerUpdateReq{}), middleware.JwtAuthenticator(), middleware.RequestDecryptor(), ApiHvyogoWorkerUpdate) // =============================== 以下是服务,只允许内网调用 ===============================