Skip to content

Commit

Permalink
Includes forks when searching repositories (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
HorlogeSkynet authored Jul 3, 2021
1 parent 96f57df commit bd37205
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/services/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export async function loadAllStars (accessToken) {
}

export async function loadSuggestions ({ value, accessToken }) {
const response = await fetch(`https://api.github.com/search/repositories?q=${value}`, makeReqOpts(accessToken))
const response = await fetch(
'https://api.github.com/search/repositories?q=' + encodeURIComponent(`${value} fork:true`),
makeReqOpts(accessToken)
)
if (response.status !== 200) { throw new Error() }
return response.json()
}
Expand Down

0 comments on commit bd37205

Please sign in to comment.