improvement: remove authentication module

This commit is contained in:
Francesco Esposito 2019-07-31 15:58:34 +02:00
parent eba2663d18
commit 63fbc39f4a
1 changed files with 0 additions and 35 deletions

View File

@ -1,35 +0,0 @@
import { config } from "../config";
import { getAuthHeader } from "../utils/auth";
import { httpClient } from "./httpClient";
export const login = (email, password) => {
const header = new Headers({
"Content-Type": "application/json"
});
const body = {
email,
password
};
const options = {
method: "POST",
headers: header,
body: JSON.stringify(body)
};
return httpClient(`${config.baseURL}users/login`, options);
};
export const validate = () => {
const header = new Headers({
authorization: getAuthHeader()
});
const options = {
method: "GET",
headers: header
};
return httpClient(`${config.baseURL}users/validate`, options);
};