cartodb-4.42/lib/assets/javascripts/new-dashboard/store/mutations/direct-db-connection.js

24 lines
517 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
import toObject from 'new-dashboard/utils/to-object';
export function setFetchingState (state) {
state.isFetching = true;
}
export function setIPs (state, ips) {
state.list = ips;
state.isFetching = false;
state.isErrored = false;
state.error = {};
}
export function setCertificates (state, certificates) {
state.list = toObject(certificates, 'id');
state.isFetching = false;
state.isErrored = false;
state.error = {};
}
export function setRequestError (state, error) {
state.error = error;
}