comparison src/lib/Shared.luan @ 14:80105b716a62

start bot
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 31 Oct 2023 23:56:48 -0600
parents af2b95854072
children 552d6f944acb
comparison
equal deleted inserted replaced
13:af2b95854072 14:80105b716a62
50 something or other in the footer 50 something or other in the footer
51 </div> 51 </div>
52 <% 52 <%
53 end 53 end
54 54
55 local function base_url()
56 local request = Http.request
57 return request.scheme.."://"..request.headers["Host"]
58 end
59 Shared.base_url = base_url
60
55 function Shared.discord_redirect_uri() 61 function Shared.discord_redirect_uri()
56 local request = Http.request 62 return base_url().."/login2.html"
57 return request.scheme.."://"..request.headers["Host"].."/login2.html"
58 end 63 end
59 64
60 function Shared.js_error(field,message) 65 function Shared.js_error(field,message)
61 %> 66 %>
62 showError( context.form, '<%=field%>', <%=json_string(message)%> ); 67 showError( context.form, '<%=field%>', <%=json_string(message)%> );