You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
403 B
JavaScript
31 lines
403 B
JavaScript
/**
|
|
* Mocking client-server processing
|
|
*/
|
|
|
|
const _settings = {
|
|
"wifi_ssid": "",
|
|
|
|
"device_mode": "active",
|
|
|
|
// deep sleep
|
|
"cloud_refresh": 97
|
|
}
|
|
|
|
import axios from 'axios'
|
|
|
|
export default {
|
|
|
|
/**
|
|
* @param cb
|
|
* @returns {PromiseLike<any> | Promise<any>}
|
|
*/
|
|
getSettings(cb) {
|
|
|
|
return _settings
|
|
|
|
return axios
|
|
.get('/api/settings')
|
|
.then(response => cb(response.data))
|
|
}
|
|
}
|