Add missing limitedAt assignment

This commit is contained in:
Zed 2023-08-20 12:31:08 +02:00
parent 3d8858f0d8
commit e8b5cbef7b

View file

@ -137,6 +137,7 @@ proc fetch*(url: Uri; api: Api): Future[JsonNode] {.async.} =
raise rateLimitError()
elif errors in {rateLimited}:
account.apis[api].limited = true
account.apis[api].limitedAt = epochTime().int
echo "rate limited, api: ", $api, ", reqs left: ", account.apis[api].remaining, ", id: ", account.id
proc fetchRaw*(url: Uri; api: Api): Future[string] {.async.} =