iteration

This commit is contained in:
Layla 2023-10-08 02:25:17 -04:00
parent c918c2da39
commit c296d2612e

View File

@ -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)