Skip to content

Conversation

@naqvis
Copy link
Contributor

@naqvis naqvis commented Nov 20, 2025

  • fix to loki query

@naqvis naqvis requested a review from stakach November 20, 2025 03:13
@github-actions github-actions bot added the type: enhancement new feature or request label Nov 20, 2025
@naqvis naqvis requested a review from chillfox November 20, 2025 03:13
Copy link
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

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

Let's use converters so we have strongly typed params

@[AC::Param::Info(description: "only return zones who have this zone as a parent (supports comma-separated list)", example: "zone-1234,zone-5678")]
parent_id : String? = nil,
@[AC::Param::Info(description: "return zones with particular tags", example: "building,level")]
tags : Array(String)? = nil,
Copy link
Member

Choose a reason for hiding this comment

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

We should be using the converter helpers to support multiple parent_ids

@[AC::Route::GET("/", converters: {tags: ConvertStringArray, parent_id: ConvertStringArray})]
def index(
      @[AC::Param::Info(description: "only return zones who have this zone as a parent (supports comma-separated list)", example: "zone-1234,zone-5678")]
      parent_id : Array(String)? = nil,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactored that endpoint

Copy link
Member

Choose a reason for hiding this comment

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

simplified it a bit more as the converter already does some of this
image

@github-actions github-actions bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 20, 2025
@github-actions github-actions bot added type: enhancement new feature or request and removed type: enhancement new feature or request labels Nov 20, 2025
@stakach stakach merged commit 6b1b8cc into master Nov 20, 2025
7 of 10 checks passed
@stakach stakach deleted the 2295 branch November 20, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants