- Added single school page

This commit is contained in:
Alexis
2020-06-14 21:20:21 +02:00
parent 5c6eca8e10
commit 9e0fb87d44
10 changed files with 97 additions and 31 deletions

View File

@@ -54,7 +54,7 @@ class IngredientRepository {
return new Promise((resolve, reject) => {
model.forge()
.where({ 'id' : id })
.fetch({ withRelated: ['spells']})
.fetch({ withRelated: ['spells', 'spells.schools', 'spells.variables', 'spells.ingredients', 'spells.schools.meta_schools']})
.then(v => {
resolve(v.toJSON({ omitPivot: true }))
})

View File

@@ -53,7 +53,7 @@ class SchoolRepository {
return new Promise((resolve, reject) => {
model.forge()
.where({ 'id' : id })
.fetch({ withRelated: ['spells', 'meta_schools']})
.fetch({ withRelated: ['spells', 'spells.schools', 'spells.variables', 'spells.ingredients', 'spells.schools.meta_schools']})
.then(v => {
resolve(v.toJSON({ omitPivot: true }))
})

View File

@@ -53,7 +53,7 @@ class VariableRepository {
return new Promise((resolve, reject) => {
model.forge()
.where({ 'id' : id })
.fetch({ withRelated: ['spells']})
.fetch({ withRelated: ['spells', 'spells.schools', 'spells.variables', 'spells.ingredients', 'spells.schools.meta_schools']})
.then(v => {
resolve(v.toJSON({ omitPivot: true }))
})