From c296d2612ef24f1b2097281f652b892a1bedb992 Mon Sep 17 00:00:00 2001 From: Layla Manley Date: Sun, 8 Oct 2023 02:25:17 -0400 Subject: [PATCH] iteration --- auth_server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth_server.lua b/auth_server.lua index 27f7ab1..8f925bd 100644 --- a/auth_server.lua +++ b/auth_server.lua @@ -87,11 +87,11 @@ while true do if request.username == nil or request.password == nil then rednet.send(client_id, "invalid request") - else if data.users[request.username] == nil then + elseif data.users[request.username] == nil then rednet.send(client_id, "user not found") log(request.username .. " failed log in attempt") - else if convert_password(request.password) == data.users[request.username].password then + elseif convert_password(request.password) == data.users[request.username].password then local token = generate_token(request.username) rednet.send(client_id, token)