Skip to content

Commit

Permalink
Copilot second commit
Browse files Browse the repository at this point in the history
  • Loading branch information
isohaildevoutlook committed Jul 22, 2023
1 parent f335b46 commit 66ba438
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions member.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function skillsMember() {
// Get the member id from the URL
var memberId = window.location.search.replace("?id=", "");
// Get the member data from the API
$.ajax({
url: "https://skillsapi.herokuapp.com/members/" + memberId,
method: "GET",
success: function (response) {
// Display the member data
$("#member-name").text(response.name);
$("#member-email").text(response.email);
$("#member-bio").text(response.bio);
$("#member-avatar").attr("src", response.avatar);
// Get the member skills from the API
$.ajax({
url: "https://skillsapi.herokuapp.com/members/" + memberId + "/skills",
method: "GET",
success: function (response) {
// Display the member skills
for (var i = 0; i < response.length; i++) {
var skill = response[i];
$("#member-skills").append("<li>" + skill.name + "</li>");
}
}
});
}
});
}

0 comments on commit 66ba438

Please sign in to comment.