feat: add operatorId to l-a-s middlewares
fix: make changes to db event handler to receive more complex payloads feat: machine actions previously on REST now work based on notifications feat: state middleware now operates based on operatorId as well chore: remove old localAppRoutes related code
This commit is contained in:
parent
32e5b1ba87
commit
7135a03654
11 changed files with 71 additions and 78 deletions
|
|
@ -18,7 +18,7 @@ const resolvers = {
|
|||
machine: (...[, { deviceId }]) => machineLoader.getMachine(deviceId)
|
||||
},
|
||||
Mutation: {
|
||||
machineAction: (...[, { deviceId, action, cashbox, cassette1, cassette2, newName }]) => machineAction({ deviceId, action, cashbox, cassette1, cassette2, newName })
|
||||
machineAction: (...[, { deviceId, action, cashbox, cassette1, cassette2, newName }, context]) => machineAction({ deviceId, action, cashbox, cassette1, cassette2, newName }, context)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
const got = require('got')
|
||||
|
||||
const logger = require('../../../logger')
|
||||
const settingsLoader = require('../../../new-settings-loader')
|
||||
|
||||
const notify = () => got.post('http://localhost:3030/dbChange')
|
||||
.catch(e => logger.error('lamassu-server not responding'))
|
||||
|
||||
const resolvers = {
|
||||
Query: {
|
||||
accounts: () => settingsLoader.showAccounts(),
|
||||
|
|
@ -14,10 +8,7 @@ const resolvers = {
|
|||
Mutation: {
|
||||
saveAccounts: (...[, { accounts }]) => settingsLoader.saveAccounts(accounts),
|
||||
// resetAccounts: (...[, { schemaVersion }]) => settingsLoader.resetAccounts(schemaVersion),
|
||||
saveConfig: (...[, { config }]) => settingsLoader.saveConfig(config).then(it => {
|
||||
notify()
|
||||
return it
|
||||
}),
|
||||
saveConfig: (...[, { config }]) => settingsLoader.saveConfig(config),
|
||||
// resetConfig: (...[, { schemaVersion }]) => settingsLoader.resetConfig(schemaVersion),
|
||||
// migrateConfigAndAccounts: () => settingsLoader.migrate()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue