Shortened return to avoid variable memory asignment

This commit is contained in:
Nicolai Ort 2021-08-21 10:01:24 +02:00
parent c2a50a1480
commit f7eae96b8c
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 1 additions and 3 deletions

View File

@ -285,10 +285,8 @@ fastify.after(() => {
//Get all visits api route
fastify.get('/api/visits', { onRequest: fastify.auth([fastify.basicAuth, fastify.verifyJWT]) }, async (req, res) => {
const visits = await knex.select('shortcode', 'provider', 'timestamp')
return await knex.select('shortcode', 'provider', 'timestamp')
.from('visits');
return visits;
});
//Get url api route