Closed ajborley closed 3 years ago
Triggered by commit: e4499460c95472438309a6544084879e079ce27e
Hi @ajborley - am I right in thinking (given the change made), this is to stop https://github.com/strimzi/strimzi-ui/blob/e4499460c95472438309a6544084879e079ce27e/server/client/router.ts#L48 responding to all requests?
@matthew-chirgwin - Yep, the ordering in https://github.com/strimzi/strimzi-ui/blob/master/server/core/modules.ts meant that the express router was mounting the client module on /
before the config, log or mockapi modules. That means that calls to GET /log or GET /config were being serviced by the client module.
This PR reverse-sorts the list based on the mountpoint so that the order of mounting is now:
/log
(log module)/config
(config module)/api
(api module)/api
(mockapi module)/
(client module)It also means, for example, that if we have a 'topics' module mounted at /api/topics
in the future, calls to that endpoint will get serviced by the topics module rather than the api module.
client
module.Contributes to: #42
Signed-off-by: Andrew Borley borley@uk.ibm.com