Re work
This commit is contained in:
parent
f0187f14f9
commit
59fd896faa
2
app.js
2
app.js
@ -82,7 +82,7 @@ app.get('/:encoded_id', function(req, res){
|
||||
Url.findOneAndUpdate({_id: id}, {$inc:{visits:1}}, function (err, doc){
|
||||
if (doc) {
|
||||
logger.debug(`Redirect: ${doc.long_url}`);
|
||||
res.redirect(307, doc.long_url);
|
||||
res.redirect(doc.long_url);
|
||||
} else {
|
||||
res.redirect(config.webhost);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user