summaryrefslogtreecommitdiffstats
path: root/server/lib/external-backends/backends/dummy-backend.js
blob: a1704e3747449d5b61707879d55cf31b99b1ca96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
var ExternalBackends = require('../external-backends.js')

class DummyBackend extends ExternalBackends {
  getCredentials () {
    return [{ type: 'switch', id: 1, name: 'switch 1', value: false }, { type: 'switch', id: 2, name: 'switch 2', value: false }, { type: 'switch', id: 3, name: 'switch 3', value: true }, { type: 'select', id: 4, name: 'selection 1', items: ['wasd', 'asdf', 'qwertz'] }, { type: 'select', id: 5, name: 'selection 2', items: ['1', '2', '3'] }]
  }

  async checkConnection (backend) {
    return { success: false, msg: 'This is a test where success was intentionally set to false!' }
  }
}

module.exports = DummyBackend