mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-09-14 19:02:35 +00:00
9 lines
247 B
JavaScript
9 lines
247 B
JavaScript
export default (req, res, next) => {
|
|
if (req.params.user_id === 'me' && res.locals.access) {
|
|
req.params.user_id = res.locals.access.token.get('attrs').id;
|
|
} else {
|
|
req.params.user_id = Number.parseInt(req.params.user_id, 10);
|
|
}
|
|
next();
|
|
};
|