Mercurial Hosting > lang
diff src/chat.html.luan @ 18:820136c5ee33
add new_chat.red
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 30 Jul 2025 15:11:24 -0600 |
parents | f5425a3c1898 |
children | 87fe70201aa8 |
line wrap: on
line diff
--- a/src/chat.html.luan Wed Jul 30 15:01:31 2025 -0600 +++ b/src/chat.html.luan Wed Jul 30 15:11:24 2025 -0600 @@ -18,18 +18,8 @@ Http.response.send_redirect("/login.html") return end - local chat_id = Http.request.parameters.chat - local chat - if chat_id ~= nil then - chat = get_chat_by_id(chat_id) or error() - else - chat = Chat.new{ - user_id = user.id - name = "whatever" - language = "jp" - } - chat.save() - end + local chat_id = Http.request.parameters.chat or error() + local chat = get_chat_by_id(chat_id) or error() Io.stdout = Http.response.text_writer() %> <!doctype html>