deb
This commit is contained in:
parent
e967e050f8
commit
b4b89350c7
2 changed files with 0 additions and 6 deletions
|
|
@ -449,12 +449,9 @@ class StorageProcessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleFind(operation: FindOperation<any>) {
|
private async handleFind(operation: FindOperation<any>) {
|
||||||
console.log("handling find")
|
|
||||||
//console.log(operation.q)
|
|
||||||
const res = await this.handleRead(operation.txId, eM => {
|
const res = await this.handleRead(operation.txId, eM => {
|
||||||
return eM.getRepository(this.getEntity(operation.entity)).find(operation.q)
|
return eM.getRepository(this.getEntity(operation.entity)).find(operation.q)
|
||||||
})
|
})
|
||||||
console.log("handled find")
|
|
||||||
this.sendResponse({
|
this.sendResponse({
|
||||||
success: true,
|
success: true,
|
||||||
type: 'find',
|
type: 'find',
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,6 @@ export default class {
|
||||||
} else if (!!to) {
|
} else if (!!to) {
|
||||||
time.created_at = LessThanOrEqual<Date>(new Date(to * 1000))
|
time.created_at = LessThanOrEqual<Date>(new Date(to * 1000))
|
||||||
}
|
}
|
||||||
console.log("fetching db data")
|
|
||||||
const [receivingInvoices, receivingAddresses, outgoingInvoices, outgoingTransactions, userToUser] = await Promise.all([
|
const [receivingInvoices, receivingAddresses, outgoingInvoices, outgoingTransactions, userToUser] = await Promise.all([
|
||||||
this.dbs.Find<UserReceivingInvoice>('UserReceivingInvoice', { where: { linkedApplication: q, ...time } }),
|
this.dbs.Find<UserReceivingInvoice>('UserReceivingInvoice', { where: { linkedApplication: q, ...time } }),
|
||||||
this.dbs.Find<UserReceivingAddress>('UserReceivingAddress', { where: { linkedApplication: q, ...time } }),
|
this.dbs.Find<UserReceivingAddress>('UserReceivingAddress', { where: { linkedApplication: q, ...time } }),
|
||||||
|
|
@ -388,10 +387,8 @@ export default class {
|
||||||
this.dbs.Find<UserTransactionPayment>('UserTransactionPayment', { where: { linkedApplication: q, ...time } }),
|
this.dbs.Find<UserTransactionPayment>('UserTransactionPayment', { where: { linkedApplication: q, ...time } }),
|
||||||
this.dbs.Find<UserToUserPayment>('UserToUserPayment', { where: { linkedApplication: q, ...time } })
|
this.dbs.Find<UserToUserPayment>('UserToUserPayment', { where: { linkedApplication: q, ...time } })
|
||||||
])
|
])
|
||||||
console.log("fetched db data 2")
|
|
||||||
const receivingTransactions = await Promise.all(receivingAddresses.map(addr =>
|
const receivingTransactions = await Promise.all(receivingAddresses.map(addr =>
|
||||||
this.dbs.Find<AddressReceivingTransaction>('AddressReceivingTransaction', { where: { user_address: { serial_id: addr.serial_id }, ...time } })))
|
this.dbs.Find<AddressReceivingTransaction>('AddressReceivingTransaction', { where: { user_address: { serial_id: addr.serial_id }, ...time } })))
|
||||||
console.log("fetched db data 3")
|
|
||||||
return {
|
return {
|
||||||
receivingInvoices, receivingAddresses, receivingTransactions,
|
receivingInvoices, receivingAddresses, receivingTransactions,
|
||||||
outgoingInvoices, outgoingTransactions,
|
outgoingInvoices, outgoingTransactions,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue