liquid_feedback_frontend
view app/main/api/support.lua @ 1717:f41f5c5f8fa2
User cannot be not entitled to vote in root level
| author | bsw | 
|---|---|
| date | Mon Sep 27 12:44:07 2021 +0200 (2021-09-27) | 
| parents | 37a366b86b49 | 
| children | 
 line source
     1 local initiative_id = param.get("initiative_id")
     3 local success = util.add_support(initiative_id)
     5 slot.set_layout(nil, "application/json")
     7 local r = json.object()
     9 if success then
    10   r.status = "ok"
    11 else
    12   r.status = "error"
    13 end
    15 slot.put_into("data", json.export(json.object{ result = r }))
    16 slot.put_into("data", "\n")
