liquid_feedback_frontend
view app/main/agent/_action/accept.lua @ 1790:20c1c8cc28ba
Splitted different meanings of rejected, specified context of accepted and invited
author | bsw |
---|---|
date | Wed Oct 20 15:48:51 2021 +0200 (2021-10-20) |
parents | 87878d24d7a8 |
children |
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 return false
7 end
9 if agent.accepted ~= nil then
10 return false
11 end
13 if param.get("rejected") then
14 agent.accepted = false
15 elseif param.get("accepted") then
16 agent.accepted = true
17 else
18 return false
19 end
21 agent:save()