fix unknown senders / receivers on profiles
This commit is contained in:
parent
1a45c82712
commit
e4ba0c71ca
2 changed files with 8 additions and 6 deletions
|
|
@ -84,6 +84,10 @@ export async function GET({ params }) {
|
|||
pricePerCoin: transaction.pricePerCoin,
|
||||
totalBaseCurrencyAmount: transaction.totalBaseCurrencyAmount,
|
||||
timestamp: transaction.timestamp,
|
||||
senderUsername: sql<string>`(SELECT username FROM ${user} WHERE id = ${transaction.senderUserId})`,
|
||||
recipientUsername: sql<string>`(SELECT username FROM ${user} WHERE id = ${transaction.recipientUserId})`,
|
||||
senderUserId: transaction.senderUserId,
|
||||
recipientUserId: transaction.recipientUserId,
|
||||
})
|
||||
.from(transaction)
|
||||
.innerJoin(coin, eq(transaction.coinId, coin.id))
|
||||
|
|
|
|||
Reference in a new issue