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!') } }