import api from './api';
const base = '/unifi';
const unifiService = {
    getConfig:   ()    => api.get(`${base}/config`).then(r => r.data.data),
    saveConfig:  (cfg) => api.post(`${base}/config`, cfg).then(r => r.data.data),
    getDevices:  ()    => api.get(`${base}/devices`).then(r => r.data.data),
    sync:        ()    => api.post(`${base}/sync`).then(r => r.data.data),
};
export default unifiService;
