chore: added missing near param and removed unused import

This commit is contained in:
2025-11-24 22:00:36 -03:00
parent f68e234ea6
commit 0e707271a4
3 changed files with 7 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ proc initQuery*(pms: Table[string, string]; name=""): Query =
excludes: validFilters.filterIt("e-" & it in pms),
since: @"since",
until: @"until",
near: @"near",
minLikes: validateNumber(@"min_faves")
)
@@ -85,6 +86,8 @@ proc genQueryParam*(query: Query): string =
result &= " since:" & query.since
if query.until.len > 0:
result &= " until:" & query.until
if query.near.len > 0:
result &= " near:\"" & query.near & "\""
if query.minLikes.len > 0:
result &= " min_faves:" & query.minLikes
if query.text.len > 0:
@@ -110,6 +113,8 @@ proc genQueryUrl*(query: Query): string =
params.add "since=" & query.since
if query.until.len > 0:
params.add "until=" & query.until
if query.near.len > 0:
params.add "near=" & query.near
if query.minLikes.len > 0:
params.add "min_faves=" & query.minLikes

View File

@@ -1,5 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-only
import asyncdispatch, strutils, sequtils, uri, options, sugar, logging
import asyncdispatch, strutils, sequtils, uri, options, sugar
import jester, karax/vdom

View File

@@ -141,6 +141,7 @@ type
fromUser*: seq[string]
since*: string
until*: string
near*: string
minLikes*: string
sep*: string