Get the user variable from req not req.headers

This commit is contained in:
2018-03-07 18:12:21 +01:00
parent 453727db1b
commit 1a4aefda14

View File

@@ -15,7 +15,7 @@ function submitRequestController(req, res) {
const type = req.query.type; const type = req.query.type;
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress; const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
const user_agent = req.headers['user-agent']; const user_agent = req.headers['user-agent'];
const user = req.headers.loggedInUser; const user = req.loggedInUser;
requestRepository.sendRequest(id, type, ip, user_agent, user) requestRepository.sendRequest(id, type, ip, user_agent, user)
.then(() => { .then(() => {