Make %(ApiResponse) a proc as conversion of wrapped types can have side-effects.

This commit is contained in:
2025-08-02 12:39:40 -05:00
parent be60254227
commit 061b0a44fc
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ func initApiResponse*[T](
totalItems: totalItems, nextLink: nextLink, prevLink: prevLink)
func `%`*(r: ApiResponse): JsonNode =
proc `%`*(r: ApiResponse): JsonNode =
result = newJObject()
if r.details.isSome: result["details"] = %r.details
if r.data.isSome: result["data"] = %r.data