From 410349f6154feaa5fbd6cf04c23bc9c473154558 Mon Sep 17 00:00:00 2001 From: ngn Date: Tue, 21 Jan 2025 05:38:43 +0300 Subject: [PATCH] what the fuck is this shit syntax Signed-off-by: ngn --- src/auth.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/auth.nim b/src/auth.nim index cac9284..c36e41b 100644 --- a/src/auth.nim +++ b/src/auth.nim @@ -187,13 +187,16 @@ proc setRateLimit*(account: GuestAccount; api: Api; remaining, reset: int) = proc initAccountPool*(cfg: Config) = let path = cfg.accountsFile + let is_jsonl = path.endswith(".jsonl") + let path_exists = fileExists(path) + enableLogging = cfg.enableDebug - if !path.endswith(".jsonl"): + if !is_jsonl: log "Accounts file should be formated with JSONL" quit 1 - if !fileExists(path): + if !path_exists: log "Failed to access the accounts file (", path, ")" quit 1