Removed visits 404 resolution

This commit is contained in:
Nicolai Ort 2021-08-21 09:51:25 +02:00
parent 824c109a42
commit 59e178476e
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 1 additions and 9 deletions

View File

@ -276,15 +276,7 @@ fastify.after(() => {
return 404;
}
const exists = await knex.select('shortcode', 'target')
.from('urls')
.where('shortcode', '=', shortcode)
.limit(1);
if (exists.length == 0) {
return 404;
}
const visits = await knex.select('timestamp')
const visits = await knex.select('timestamp', 'provider')
.from('visits')
.where('shortcode', '=', shortcode);