Explorar el Código

Made things a bit cleaner

master
Ludovic 'Archivist' Lagouardette hace 3 años
padre
commit
9ce58d42ae
Se han modificado 2 ficheros con 5 adiciones y 3 borrados
  1. +4
    -2
      scripts/my_func.lua
  2. +1
    -1
      src/app/button.ecr

+ 4
- 2
scripts/my_func.lua Ver fichero

@ -2,12 +2,14 @@ function run_event(name)
print("run " .. name)
if(name == "archivist") then
Business.fetch_add(10)
else
elseif(name == "reset") then
Business.fetch_add(-Business.fetch_add(0))
else
Business.fetch_add(1)
end
end
function display_event(name)
print("display " .. name)
return Business.fetch_add(0)
return tostring(Business.fetch_add(0))
end

+ 1
- 1
src/app/button.ecr Ver fichero

@ -2,7 +2,7 @@
<html>
<head></head>
<body>
<div> <%= display_event.as(Lua::Function).call(name).as(Float64).to_i32!; %> </div>
<div> <%= display_event.as(Lua::Function).call(name).as(String); %> </div>
<form method="POST" action=<%= "/"+name %>>
<input type="submit" value="Go">
</form>

Cargando…
Cancelar
Guardar