Skip to content

Commit

Permalink
fix(cu): api call into correct BL
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Dec 19, 2023
1 parent c51bb91 commit cf6ef5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions servers/cu/src/domain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ export const createApis = (ctx) => {
loadMessageMeta: AoSuClient.loadMessageMetaWith({ fetch: ctx.fetch, logger: readResultLogger })
})

const readCronMessagesLogger = ctx.logger.child('readCronMessages')
const readCronMessages = readCronOutboxesWith({
...sharedDeps(readCronMessagesLogger),
findEvaluations: PouchDbClient.findEvaluationsWith({ pouchDb, logger: readCronMessagesLogger })
const readCronOutboxesLogger = ctx.logger.child('readCronOutboxes')
const readCronOutboxes = readCronOutboxesWith({
...sharedDeps(readCronOutboxesLogger),
findEvaluations: PouchDbClient.findEvaluationsWith({ pouchDb, logger: readCronOutboxesLogger })
})

const arweave = WalletClient.createWalletClient()
const healthcheck = healthcheckWith({
walletAddress: WalletClient.addressWith({ WALLET: ctx.WALLET, arweave })
})

return { readState, readResult, readCronMessages, healthcheck }
return { readState, readResult, readCronOutboxes, healthcheck }
}
4 changes: 2 additions & 2 deletions servers/cu/src/routes/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ export const withCronRoutes = app => {
const {
params: { processId },
query: { from, to },
domain: { apis: { readScheduledMessages } }
domain: { apis: { readCronOutboxes } }
} = req

const input = inputSchema.parse({ processId, from, to })

await readScheduledMessages(input)
await readCronOutboxes(input)
.map(({ evaluations }) => res.send(cronConnection({
nodes: evaluations,
/**
Expand Down

0 comments on commit cf6ef5d

Please sign in to comment.