Skip to content

Commit

Permalink
ch[#162022528] Connect user profile to api
Browse files Browse the repository at this point in the history
  • Loading branch information
ebenezerdon committed Nov 16, 2018
1 parent 1ce89a1 commit fbfa0c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions UI/assets/js/attendantdashboard.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-disable no-plusplus */
const url = 'https://newstoremanager.herokuapp.com/api/v1';
const { userId } = localStorage;

const getCurrentUser = () => {
fetch(`${url}/users/${userId}`, {
const getMyProfile = () => {
fetch(`${url}/users/me`, {
headers: {
'Content-Type': 'application/json',
accesstoken: localStorage.accesstoken,
Expand Down Expand Up @@ -68,6 +67,6 @@ const getProducts = () => {
});
};

window.onload = getCurrentUser();
window.onload = getMyProfile();
window.onload = getProducts();
window.onload = getSales();

0 comments on commit fbfa0c2

Please sign in to comment.