Skip to content

Commit

Permalink
Bug fix in api request (#3493)
Browse files Browse the repository at this point in the history
Upload was coded to pull URI from redux store, but the action expected a parameter.
  • Loading branch information
MVarshini committed Jul 11, 2023
1 parent 32c6c5c commit 5e1ae3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/actions/relayActions.js
Expand Up @@ -7,11 +7,11 @@ import { getDatasets } from "./overviewActions";
import { showToast } from "./toastActions";
import { uriTemplate } from "../utils/helper";

export const uploadFile = (fileURI) => async (dispatch, getState) => {
export const uploadFile = () => async (dispatch, getState) => {
try {
dispatch({ type: TYPES.LOADING });
const endpoints = getState().apiEndpoint.endpoints;

const fileURI = getState().overview.relayInput;
const uri = uriTemplate(endpoints, "relay", { uri: fileURI });
const response = await API.post(uri, null, null);
if (response.status >= 200 && response.status < 300) {
Expand Down

0 comments on commit 5e1ae3c

Please sign in to comment.