I do not think there is any issue in the domain implementation. I believe this error was introduced with this change:
+ // Protected User routes
+ router.POST("/v1/dispatch/"+user.ChangeUserEmailAddress, commandDispatchHandler)
router.USE(http.MethodPost, "/v1/dispatch/"+user.ChangeUserEmailAddress, firewall.GrantAccessFor("USER"))
+ // Public User routes
router.POST("/v1/dispatch/{command}", commandDispatchHandler)
The declaration for "/v1/dispatch/"+user.ChangeUserEmailAddress route should not be necessary and if middleware is not being called, then it is a router problem. I am pretty sure that this logic was working (flow described in the readme file) so either this change, or latest version of gorouter introduced this issue.
I do not think there is any issue in the domain implementation. I believe this error was introduced with this change:
The declaration for
"/v1/dispatch/"+user.ChangeUserEmailAddress
route should not be necessary and if middleware is not being called, then it is a router problem. I am pretty sure that this logic was working (flow described in the readme file) so either this change, or latest version of gorouter introduced this issue.Edit: https://github.com/vardius/gorouter/issues/14