From b5df5c779971082498ca9a988db09b98b2e40c13 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Wed, 27 Oct 2021 14:40:18 +0200 Subject: [PATCH] Fixing some bugs --- app/Controllers/Http/LinksController.ts | 2 ++ commands/Update.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Controllers/Http/LinksController.ts b/app/Controllers/Http/LinksController.ts index 4038975..fc01006 100755 --- a/app/Controllers/Http/LinksController.ts +++ b/app/Controllers/Http/LinksController.ts @@ -22,6 +22,7 @@ export default class LinksController { await link.load('author', (query) => { query.select('email') }) + await link.load('clicks') return response.status(200).send({ link }) @@ -60,6 +61,7 @@ export default class LinksController { .preload('author', (query) => { query.select('email') }) + .preload('clicks') return response.status(200).send({ links }) diff --git a/commands/Update.ts b/commands/Update.ts index 11ab198..839c3ab 100644 --- a/commands/Update.ts +++ b/commands/Update.ts @@ -44,6 +44,6 @@ export default class Update extends BaseCommand { link.expire = DateTime.fromJSDate(new Date(this.expire || new Date())) ?? null } await link.save() - this.logger.info('The user was successfully updated!') + this.logger.info('The link was successfully updated!') } }