liquid_feedback_frontend
view app/main/agent/_action/accept.lua @ 1657:4d5f30d8df4a
Updated installation instructions
| author | bsw | 
|---|---|
| date | Sun Feb 14 13:12:08 2021 +0100 (2021-02-14) | 
| parents | 32cc544d5a5b | 
| children | 87878d24d7a8 | 
 line source
     1 local controlled_id = param.get("controlled_id")
     3 local agent = Agent:by_pk(controlled_id, app.session.member_id)
     5 if not agent then
     6   print("A")
     7   return false
     8 end
    10 if agent.accepted ~= nil then
    11   print("B")
    12   return false
    13 end
    15 if param.get("rejected") then
    16   print("C")
    17   agent.accepted = false
    18 elseif param.get("accepted") then
    19   print("D")
    20   agent.accepted = true
    21 else
    22   print("E")
    23   return false
    24 end
    25 print("F")
    26 agent:save()
