|
|
|
|
|
by tracker1
2723 days ago
|
|
That would be relatively easy to do something very similar with middleware for express/koa router.get('/users/:id'. skipNonUuid(id => ...))
You simply have a function/middleware that does the check.... or `compose(skipNonUuid, dbo.findUserById, ui.formatView('modelName'))`You can do function composition that is nearly as simple and far more flexible in general with JS |
|