From 63fbc39f4a64d0faf7c5d36b6b6c3a5ef7726346 Mon Sep 17 00:00:00 2001 From: Francesco Esposito <33671357+frsposito@users.noreply.github.com> Date: Wed, 31 Jul 2019 15:58:34 +0200 Subject: [PATCH] improvement: remove authentication module --- src/api/authentication.js | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/api/authentication.js diff --git a/src/api/authentication.js b/src/api/authentication.js deleted file mode 100644 index 481a5e7..0000000 --- a/src/api/authentication.js +++ /dev/null @@ -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); -};