mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Fix
This commit is contained in:
@@ -27,7 +27,7 @@ export default class AnnouncesController {
|
||||
await announce.related('message').associate(translation)
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await announce.related('cover').save(cover)
|
||||
if (cover) await announce.related('cover').associate(cover)
|
||||
|
||||
return response.status(200).send({
|
||||
announce: announce
|
||||
@@ -53,7 +53,7 @@ export default class AnnouncesController {
|
||||
}
|
||||
|
||||
const cover = await File.findBy('label', data.cover)
|
||||
if (cover) await announce.related('cover').save(cover)
|
||||
if (cover) await announce.related('cover').associate(cover)
|
||||
|
||||
return response.status(200).send({
|
||||
announce
|
||||
|
||||
Reference in New Issue
Block a user