axios is giving 404 not found error with all requests

My Index file is as follows. I am importing mock from mock.js:

import mock from "./mock";
import "../components/todo/index";

mock.onAny().passThrough();

Mock.js

import MockAdapter from "axios-mock-adapter";
import dataAPI from "./dataAPI";
export const dataAPI = axios.create();

const mock = new MockAdapter(dataAPI);

export default mock;

dataAPI.js


import axios from "axios";

export const dataAPI = axios.create();

this is how I am returning data. code form todo Index file responsible for returning data.

dataAPI.onGet("/apps/todo/").reply((config) => {
  // eslint-disable-next-line object-curly-newline
  const { q = "", filter, tag, sortBy: sortByParam = "latest" } = config.params;
  /* eslint-enable */
  // ------------------------------------------------
  // Get Sort by and Sort Direction
  // ------------------------------------------------
  let sortDesc = true;

  const sortBy = (() => {
    if (sortByParam === "title-asc") {
      sortDesc = false;
      return "title";
    }
    if (sortByParam === "title-desc") return "title";
    if (sortByParam === "assignee") {
      sortDesc = false;
      return "assignee";
    }
    if (sortByParam === "due-date") {
      sortDesc = false;
      return "dueDate";
    }
    return "id";
  })();