We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b650559 commit 8b8b124Copy full SHA for 8b8b124
app/controllers/shortlink.js
@@ -51,7 +51,9 @@ module.exports = function (app, passport) {
51
const regex = new RegExp(`.*${req.params.id}$`, 'i')
52
Collection.findOneAndUpdate(
53
{ name: config.shortlinkCollectionName, 'links.url': regex },
54
- { $inc: { 'links.$.hits': 1 } }
+ { $inc: { 'links.$.hits': 1 } },
55
+ {},
56
+ err => !!err && logger.error(err)
57
)
58
59
return res.redirect(obj.url)
0 commit comments