Removed visits 404 resolution
This commit is contained in:
parent
824c109a42
commit
59e178476e
|
@ -276,15 +276,7 @@ fastify.after(() => {
|
||||||
return 404;
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
const exists = await knex.select('shortcode', 'target')
|
const visits = await knex.select('timestamp', 'provider')
|
||||||
.from('urls')
|
|
||||||
.where('shortcode', '=', shortcode)
|
|
||||||
.limit(1);
|
|
||||||
if (exists.length == 0) {
|
|
||||||
return 404;
|
|
||||||
}
|
|
||||||
|
|
||||||
const visits = await knex.select('timestamp')
|
|
||||||
.from('visits')
|
.from('visits')
|
||||||
.where('shortcode', '=', shortcode);
|
.where('shortcode', '=', shortcode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue