refactor: reuse tx to csv gql query and overall function simplification
This commit is contained in:
parent
5826a29c53
commit
fe518b21d7
4 changed files with 74 additions and 69 deletions
|
|
@ -301,8 +301,7 @@ const typeDefs = gql`
|
|||
offset: Int
|
||||
deviceId: ID
|
||||
): [Transaction]
|
||||
transactionsCsv(from: Date, until: Date, limit: Int, offset: Int): String
|
||||
simplifiedTransactionsCsv(from: Date, until: Date, limit: Int, offset: Int): String
|
||||
transactionsCsv(from: Date, until: Date, limit: Int, offset: Int, simplified: Boolean): String
|
||||
accounts: JSONObject
|
||||
config: JSONObject
|
||||
blacklist: [Blacklist]
|
||||
|
|
@ -398,10 +397,8 @@ const resolvers = {
|
|||
serverLogs.getServerLogs(from, until, limit, offset).then(parseAsync),
|
||||
transactions: (...[, { from, until, limit, offset, deviceId }]) =>
|
||||
transactions.batch(from, until, limit, offset, deviceId),
|
||||
transactionsCsv: (...[, { from, until, limit, offset }]) =>
|
||||
transactions.batch(from, until, limit, offset).then(parseAsync),
|
||||
simplifiedTransactionsCsv: (...[, { from, until, limit, offset }]) =>
|
||||
transactions.simplifiedBatch(from, until, limit, offset).then(parseAsync),
|
||||
transactionsCsv: (...[, { from, until, limit, offset, simplified }]) =>
|
||||
transactions.batch(from, until, limit, offset, null, simplified).then(parseAsync),
|
||||
config: () => settingsLoader.loadLatestConfigOrNone(),
|
||||
accounts: () => settingsLoader.showAccounts(),
|
||||
blacklist: () => blacklist.getBlacklist(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue