Fix owner stuff for pledges

This commit is contained in:
2022-01-08 21:24:44 +02:00
parent 44acf00d43
commit 69acae4ed2
3 changed files with 24 additions and 4 deletions

View File

@@ -12,7 +12,17 @@ module.exports = function (options) {
association: db.Pledge.TranslationArtifactVersionPledges association: db.Pledge.TranslationArtifactVersionPledges
}, },
{ {
association: db.Pledge.Entity association: db.Pledge.Owner,
include: [
{
association: db.Owner.OwnerEntity,
include: [
{
association: db.OwnerEntity.Entity
}
]
}
]
} }
] ]
}).then(pledges => { }).then(pledges => {
@@ -35,7 +45,17 @@ module.exports = function (options) {
db.Pledge.findByPk(request.params.id, { db.Pledge.findByPk(request.params.id, {
include: [ include: [
{ {
association: db.Pledge.Entity association: db.Pledge.Owner,
include: [
{
association: db.Owner.OwnerEntity,
include: [
{
association: db.OwnerEntity.Entity
}
]
}
]
}, },
{ {
association: db.Pledge.TranslationArtifactVersionPledges, association: db.Pledge.TranslationArtifactVersionPledges,

View File

@@ -10,7 +10,7 @@ block content
h1 #{totalSatoshis} sats Pledge h1 #{totalSatoshis} sats Pledge
p.flow-text p.flow-text
small #{pledge.entity.name} small #{pledge.owner.ownerEntity.entity.name}
br br
span= pledge.message span= pledge.message

View File

@@ -14,6 +14,6 @@ block content
a(href=`/pledges/${pledge.id}`) #{totalSatoshis} sats for #{pledge.translationArtifactVersionPledges.length} translations a(href=`/pledges/${pledge.id}`) #{totalSatoshis} sats for #{pledge.translationArtifactVersionPledges.length} translations
br br
small small
small.chip= pledge.entity.name small.chip= pledge.owner.ownerEntity.entity.name
br br
small= pledge.message small= pledge.message