huridocs/uwazi

View on GitHub
app/react/Thesauri/actions/thesaurisActions.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { actions } from 'app/BasicReducer';
import api from 'app/Thesauri/ThesauriAPI';

export function reloadThesauri() {
  return dispatch =>
    api.get().then(response => {
      dispatch(actions.set('thesauris', response));
    });
}