chore: server code formatting
This commit is contained in:
parent
aedabcbdee
commit
68517170e2
234 changed files with 9824 additions and 6195 deletions
|
|
@ -5,13 +5,21 @@ const logDateFormat = require('../../../logs').logDateFormat
|
|||
const resolvers = {
|
||||
Query: {
|
||||
cashboxBatches: () => cashbox.getBatches(),
|
||||
cashboxBatchesCsv: (...[, { from, until, timezone }]) => cashbox.getBatches(from, until)
|
||||
.then(data => parseAsync(logDateFormat(timezone, cashbox.logFormatter(data), ['created'])))
|
||||
cashboxBatchesCsv: (...[, { from, until, timezone }]) =>
|
||||
cashbox
|
||||
.getBatches(from, until)
|
||||
.then(data =>
|
||||
parseAsync(
|
||||
logDateFormat(timezone, cashbox.logFormatter(data), ['created']),
|
||||
),
|
||||
),
|
||||
},
|
||||
Mutation: {
|
||||
createBatch: (...[, { deviceId, cashboxCount }]) => cashbox.createCashboxBatch(deviceId, cashboxCount),
|
||||
editBatch: (...[, { id, performedBy }]) => cashbox.editBatchById(id, performedBy)
|
||||
}
|
||||
createBatch: (...[, { deviceId, cashboxCount }]) =>
|
||||
cashbox.createCashboxBatch(deviceId, cashboxCount),
|
||||
editBatch: (...[, { id, performedBy }]) =>
|
||||
cashbox.editBatchById(id, performedBy),
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = resolvers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue