Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { products } from "./api/products";
import { polls } from "./api/polls";
import { associations } from "./api/associations";
import { tags } from "./api/tags";
import { namespaces } from "./api/namespaces";
import { jwt } from "./api/jwt";
import { users } from "./api/users";
import { fundings } from "./api/fundings";
import { profile } from "./api/profile";
import { roles } from "./api/roles";
import { loanables } from "./api/library/loanables";
import { loans } from "./api/library/loans";
const baseApi = "http://localhost:8000/api/v1";
export const apiService = applyConverters(
Axios.create({
withCredentials: true,
baseURL: baseApi,
})
);
/**
* Add a callback function to the promise, called on success, which returns the `data` of the `AxiosResponse`.
*/
export function unwrap(promise): Promise {
return promise.then((response: AxiosResponse) => {
return response.data;
});
}
export const api = {