Now passes the user agent that is making the post request (requesting content) so it can be saved in the db.
This commit is contained in:
@@ -13,8 +13,9 @@ function submitRequestController(req, res) {
|
||||
const id = req.params.mediaId;
|
||||
const type = req.query.type;
|
||||
var ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
|
||||
var user_agent = req.headers['User-Agent']
|
||||
|
||||
requestRepository.sendRequest(id, type, ip)
|
||||
requestRepository.sendRequest(id, type, ip, user_agent)
|
||||
.then(() => {
|
||||
res.send({ success: true, message: 'Media item sucessfully requested!' });
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user