The main server, and probably only repository in this org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
321 B

import store from "../Reducers";
import {fetchGet} from "../Helpers/fetcher";
import {lightsReceivedEvent} from "../Reducers/lightReducer";
const dispatch = store.dispatch;
export function getLights() {
fetchGet("/light/").then(res => {
if (res !== null) {
dispatch(lightsReceivedEvent(res));
}
});
}