Mercurial Hosting > lang
comparison src/new_chat.red.luan @ 23:0c17c233c45a
start courses
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 30 Jul 2025 23:29:33 -0600 |
| parents | 820136c5ee33 |
| children | 87fe70201aa8 |
comparison
equal
deleted
inserted
replaced
| 22:7b35fb1e6603 | 23:0c17c233c45a |
|---|---|
| 6 local Chat = require "site:/lib/Chat.luan" | 6 local Chat = require "site:/lib/Chat.luan" |
| 7 | 7 |
| 8 | 8 |
| 9 return function() | 9 return function() |
| 10 local user = current_user() or error() | 10 local user = current_user() or error() |
| 11 local language = Http.request.parameters.language or error() | |
| 11 local chat = Chat.new{ | 12 local chat = Chat.new{ |
| 12 user_id = user.id | 13 user_id = user.id |
| 13 name = "whatever" | 14 name = "whatever" |
| 14 language = "jp" | 15 language = language |
| 15 } | 16 } |
| 16 chat.save() | 17 chat.save() |
| 17 Http.response.send_redirect("chat.html?chat="..chat.id) | 18 Http.response.send_redirect("chat.html?chat="..chat.id) |
| 18 end | 19 end |
