Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some problem about "hz update #1115

Closed
ChinaPhpZyp opened this issue May 15, 2024 · 0 comments
Closed

Some problem about "hz update #1115

ChinaPhpZyp opened this issue May 15, 2024 · 0 comments

Comments

@ChinaPhpZyp
Copy link

Describe the Question

A clear and concise description of what the question is.

Expected behavior

Steps to reproduce the behavior:

  1. At first, we have a service called "getCustomerMessageList" with route is "/seller/customer/message/list" . The route have the function for middle is "message0Mv()"
  2. Some time later, the other teammate write a service called "userAndCustomerList" with route is "/message/customer".
  3. The getCustomerMessageList's router will change to bind "message1Mv()", and "message0Mv()" will be bind by the userAndCustomerList.
  4. Then the route will be useless because the middleware is Auth Validate

I just want to ask some ways to deal this . Maybe the "thirft" file can support to wirte the relation of the route and the middleware

Screenshots

func _message0Mw() []app.HandlerFunc {
	return nil
}

func _message2Mw() []app.HandlerFunc {
	// your code...
	return []app.HandlerFunc{
		jwt.JWTAuth(config.GlobalServerConfig.JWTInfo.SigningKey),
	}
}

Hertz version:

hz version v0.8.1

@ChinaPhpZyp ChinaPhpZyp closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant