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

5 years ago
  1. import store from "../Reducers";
  2. import {fetchGet} from "../Helpers/fetcher";
  3. import {lightsReceivedEvent} from "../Reducers/lightReducer";
  4. const dispatch = store.dispatch;
  5. export function getLights() {
  6. fetchGet("/light/").then(res => {
  7. if (res !== null) {
  8. dispatch(lightsReceivedEvent(res));
  9. }
  10. });
  11. }