ES6 Plato on Github
Report Home
Summary Display
actions/investigations.js
Maintainability
79.52
Lines of code
25
Difficulty
11.38
Estimated Errors
0.13
Function weight
By Complexity
By SLOC
import axios from "axios"; import { getInvestigationsByUser, getEmbargoedInvestigations, getReleasedInvestigations } from '../api/icat/icatPlus.js'; import { FECTH_INVESTIGATIONS, FECTH_MY_INVESTIGATIONS, FECTH_RELEASED_INVESTIGATIONS } from '../constants/ActionTypes'; export function fetchMyInvestigations(sessionId) { return { type: FECTH_MY_INVESTIGATIONS, payload: axios.get(getInvestigationsByUser(sessionId)) }; } export function fecthEmbargoedInvestigations(sessionId) { return { type: FECTH_INVESTIGATIONS, payload: axios.get(getEmbargoedInvestigations(sessionId)) }; } export function fecthReleasedInvestigations(sessionId) { return { type: FECTH_RELEASED_INVESTIGATIONS, payload: axios.get(getReleasedInvestigations(sessionId)) }; }