Skip to content

Update api query params#186

Merged
CodexRaunak merged 1 commit into
layer5io:masterfrom
CodexRaunak:api-fix
Apr 27, 2026
Merged

Update api query params#186
CodexRaunak merged 1 commit into
layer5io:masterfrom
CodexRaunak:api-fix

Conversation

@CodexRaunak

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Raunak Madan <madanraunak24@gmail.com>
@CodexRaunak CodexRaunak merged commit 1b95d7e into layer5io:master Apr 27, 2026
2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the registry URL construction in the Hugo partial to include a status filter. A suggestion was made to use the built-in querify function for more robust and idiomatic query string construction, ensuring proper URL encoding for parameters.

{{- else -}}
{{- $separator := cond (in $registryURL "?") "&" "?" -}}
{{- $url := printf "%s%sorgId=%s" $registryURL $separator $orgID -}}
{{- $url := printf "%s%sorgId=%s&status=ready,not_ready" $registryURL $separator $orgID -}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using Hugo's built-in querify function is a more robust and idiomatic way to construct query strings compared to manual concatenation. It automatically handles URL encoding for all parameter values, which prevents potential bugs if $orgID contains characters that require escaping.

Suggested change
{{- $url := printf "%s%sorgId=%s&status=ready,not_ready" $registryURL $separator $orgID -}}
{{- $url := printf "%s%s%s" $registryURL $separator (querify "orgId" $orgID "status" "ready,not_ready") -}}

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant