summaryrefslogtreecommitdiffstats
path: root/server/lib/external-backends/backends/dummy-backend.js
blob: 99d27c1f28b49ee451e5f378fc4d1985a90d84f6 (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 () {
    return { success: false, msg: 'This is a test where success was intentionally set to false!' }
  }
}

module.exports = DummyBackend