📅  最后修改于: 2022-03-11 15:02:39.839000             🧑  作者: Mango
// This protected route must be accessed either by passing both username + password,
// or by passing an access token
app.post(
'/protected/route',
oneOf([
[check('username').exists(), check('password').exists()],
check('access_token').exists()
]),
someRouteHandler,
);