web: Common: Moved api from store/services to root level

This commit is contained in:
Alexey Safronov 2019-11-25 15:52:34 +03:00
parent d13e729282
commit 7175c2ba0b
12 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,5 @@
import axios from "axios";
import { AUTH_KEY } from "../../../constants";
//import { toastr } from "asc-web-components";
import { AUTH_KEY } from "../constants";
const PREFIX = "api";
const VERSION = "2.0";

View File

@ -1,4 +1,4 @@
import { toUrlParams } from "../../../../utils";
import { toUrlParams } from "../../utils";
const DEFAULT_PAGE = 0;
const DEFAULT_PAGE_COUNT = 25;

View File

@ -25,9 +25,8 @@ import styled from "styled-components";
import { useTranslation } from "react-i18next";
import i18n from "./i18n";
import SubModalDialog from "./sub-components/modal-dialog";
//import { store, api } from 'asc-web-common';
import { login, setIsLoaded } from "../../store/auth/actions"; //store.auth.actions;
import { sendInstructionsToChangePassword } from "../../store/services/api/people"; //api.people;
import { login, setIsLoaded } from "../../store/auth/actions";
import { sendInstructionsToChangePassword } from "../../api/people";
const FormContainer = styled(Container)`
margin-top: 70px;

View File

@ -1,4 +1,4 @@
export { default as api } from './store/services/api';
export { default as api } from './api';
export { default as store } from './store';
export { default as history } from './history';
export * from './components';

View File

@ -1,4 +1,4 @@
import { default as api } from "../services/api";
import { default as api } from "../../api";
export const LOGIN_POST = "LOGIN_POST";
export const SET_CURRENT_USER = "SET_CURRENT_USER";