adjsuted pw gen

This commit is contained in:
Paul Wilde 2023-10-28 22:02:55 +01:00
parent 0f8b325246
commit 91ca8e12a4

View file

@ -30,7 +30,9 @@ proc parsePw(body: string) =
proc getPW() = proc getPW() =
var c = newHttpClient() var c = newHttpClient()
try: try:
let resp = c.get("https://random-word-api.herokuapp.com/word?number=" & $number & "&length=" & $word_len) let url = "https://random-word-api.herokuapp.com/word?number=" & $number & "&length=" & $word_len
echo url
let resp = c.get(url)
if resp.status == $Http200: if resp.status == $Http200:
parsePw(resp.body) parsePw(resp.body)