重新调整w,r的入口
This commit is contained in:
@@ -28,7 +28,7 @@ func ReadImagesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
resp := l.ReadImages(&req, userinfo)
|
||||
|
||||
if !basic.AfterLogic(w, r, rl) {
|
||||
if !basic.AfterLogic(w, r, rl, resp) {
|
||||
basic.NormalAfterLogic(w, r, resp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func ToUnityHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
|
||||
resp := l.ToUnity(&req, userinfo)
|
||||
|
||||
if !basic.AfterLogic(w, r, rl) {
|
||||
if !basic.AfterLogic(w, r, rl, resp) {
|
||||
basic.NormalAfterLogic(w, r, resp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewReadImagesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ReadIm
|
||||
// }
|
||||
|
||||
// 处理逻辑后 w,r 如:重定向
|
||||
// func (l *ReadImagesLogic) AfterLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// func (l *ReadImagesLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// }
|
||||
|
||||
func (l *ReadImagesLogic) ReadImages(req *types.RequestReadImages, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
|
||||
@@ -31,7 +31,7 @@ func NewToUnityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ToUnityLo
|
||||
// }
|
||||
|
||||
// 处理逻辑后 w,r 如:重定向
|
||||
// func (l *ToUnityLogic) AfterLogic(w http.ResponseWriter, r *http.Request) {
|
||||
// func (l *ToUnityLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
|
||||
// }
|
||||
|
||||
func (l *ToUnityLogic) ToUnity(req *types.RequestToUnity, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
|
||||
Reference in New Issue
Block a user