mirror of
https://github.com/ArthurDanjou/artdanj-shortener.git
synced 2026-01-14 13:54:03 +01:00
Fixing some bugs
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
@@ -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!')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user