generated from skills/copilot-codespaces-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f335b46
commit 66ba438
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>"); | ||
} | ||
} | ||
}); | ||
} | ||
}); | ||
} |