Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Añadiendo mas información al perfil #2

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Añadiendo data de profile
  • Loading branch information
LauraJimenezH committed Feb 15, 2018
commit 46337842500380d6278572e3c7048f31abd80959
18 changes: 9 additions & 9 deletions public/js/app.js
Original file line number Diff line number Diff line change
@@ -15,13 +15,13 @@ function getProfileData() {

// Handle the successful return from the API call
function displayProfileData(data) {
var user = data.values[0];
// console.log(data);
console.log(user);
}

// Handle an error response from the API call
// Manejar una respuesta de error de la llamada API
function onError(error) {
console.log(error);
let user = data.values[0];
let firstName = user.firstName;
let lastName = user.lastName;
let emailAddress= user.emailAddress;
let headline = user.headline;
let boxUser = document.getElementById('box-user');
boxUser.innerHTML = '<p class="text-center">'+ firstName+ ' '+ lastName+'<p>'+
'<p class="text-center">' + emailAddress + '</p>' +
'<p class="text-center">' + headline + '</p>';
}