liquid_feedback_frontend

diff app/main/opinion/_action/xhr_update.lua @ 1649:4188405c2425

Rework of suggestion views
author bsw
date Thu Feb 11 15:48:02 2021 +0100 (2021-02-11)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/opinion/_action/xhr_update.lua	Thu Feb 11 15:48:02 2021 +0100
     1.3 @@ -0,0 +1,14 @@
     1.4 +local suggestion_id = param.get("suggestion_id", atom.integer)
     1.5 +local degree = param.get("degree", atom.number)
     1.6 +local fulfilled = param.get("fulfilled", atom.boolean)
     1.7 +
     1.8 +print(degree, fulfilled)
     1.9 +
    1.10 +slot.set_layout()
    1.11 +
    1.12 +if Opinion:update(suggestion_id, app.session.member_id, degree, fulfilled) then
    1.13 +  slot.put_into("data", "ok")
    1.14 +else
    1.15 +  request.set_status("500 Internal Server Error")
    1.16 +end
    1.17 +

Impressum / About Us