Skip to content

Commit

Permalink
fix cfclient category restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
froehlichA committed Feb 28, 2022
1 parent cf2c9bb commit ef5e938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/cfclient.nim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const
proc fetchAddonsByQuery*(query: string, category = CfAddonGameCategory.Mod): Future[seq[CfAddon]] {.async.} =
## retrieves all addons that match the given `query` search and `category`.
let encodedQuery = encodeUrl(query, usePlus = false)
let url = addonsBaseUrl & "/v1/mods/search?gameId=432&classId=" & $category & "&pageSize=50&sortField=6&sortOrder=desc&searchFilter=" & encodedQuery
let url = addonsBaseUrl & "/v1/mods/search?gameId=432&classId=" & $ord(category) & "&pageSize=50&sortField=6&sortOrder=desc&searchFilter=" & encodedQuery
try:
return get(url.Url).await.parseJson["data"].addonsFromForgeSvc
except HttpRequestError:
Expand Down

0 comments on commit ef5e938

Please sign in to comment.