Skip to content

Halyna R.#5

Open
halyna1995 wants to merge 2 commits intoHackYourAssignment:mainfrom
halyna1995:main
Open

Halyna R.#5
halyna1995 wants to merge 2 commits intoHackYourAssignment:mainfrom
halyna1995:main

Conversation

@halyna1995
Copy link
Copy Markdown

Complete assignment for week 9

@github-actions
Copy link
Copy Markdown

📝 HackYourFuture auto grade

Assignment Score: 100 / 100 ✅

Status: ✅ Passed
Minimum score to pass: 50
🧪 The auto grade is experimental and still being improved

Test Details
Vitest unit test results:

✅ post.sh: Script exists
✅ post.sh: Create user John Doe
✅ patch.sh: Script exists
✅ patch.sh: Correct the email address
✅ get.sh: Script exists
✅ get.sh: Retrieve user John Doe details
✅ delete.sh: Script exists
✅ delete.sh: Delete user John Doe
✅ get.sh: Verify user John Doe has been deleted
✅ Uses the correct base URL
✅ URL includes the nobelPrizeYear query parameter
✅ URL includes the nobelPrizeCategory query parameter
✅ URL includes the offset query parameter
✅ URL includes the limit query parameter
✅ Omits the nobelPrizeYear when set to "all"
✅ Omits the nobelPrizeCategory when set to "all"
✅ Includes the sort query parameter set to desc

Total passed: 17
Total failed: 0
Killed

@durw4rd durw4rd self-assigned this Mar 17, 2026
Copy link
Copy Markdown

@durw4rd durw4rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

@durw4rd durw4rd added the Reviewed This assignment has been reivewed by a mentor and a feedback has been provided label Mar 17, 2026
*/
export function fetchNobelPrizes(filters = {}, onSuccess, onError) {
let url = ''; // TODO Construct the full URL with query parameters;
let url = `${API_BASE_URL}/nobelPrizes?offset=${filters.offset}&limit=${filters.limit}&sort=desc`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On one hand, I like the concise syntax; on the other, the instructions mention the following:

Tip: Use the URLSearchParams Web API to build the query string. It handles encoding and formatting for you.

The automatic URL encoding would be handy if not covered by the imported fetchData function (I didn't check, but suspect that might be the case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed This assignment has been reivewed by a mentor and a feedback has been provided

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants