mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Preload label
This commit is contained in:
@@ -13,7 +13,9 @@ export default class ProjectsController {
|
||||
.orderBy('id', 'asc')
|
||||
.preload('cover')
|
||||
.preload('description')
|
||||
.preload('tags')
|
||||
.preload('tags', (tags) => {
|
||||
tags.preload('label')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export default class Projects extends BaseSchema {
|
||||
.onDelete('CASCADE')
|
||||
table.string('url').notNullable()
|
||||
table
|
||||
.integer('file_id')
|
||||
.integer('cover_id')
|
||||
.unsigned()
|
||||
.references('files.id')
|
||||
.onDelete('CASCADE')
|
||||
|
||||
Reference in New Issue
Block a user