liquid_feedback_frontend

view app/main/interest/_action/update.lua @ 0:3bfb2fcf7ab9

Version alpha1
author bsw/jbe
date Wed Nov 18 12:00:00 2009 +0100 (2009-11-18)
parents
children afd9f769c7ae
line source
1 local issue_id = assert(param.get("issue_id", atom.integer), "no issue id given")
2 local interest = Interest:by_pk(issue_id, app.session.member.id)
4 if param.get("delete", atom.boolean) then
5 if interest then
6 interest:destroy()
7 slot.put_into("notice", _"Interest removed")
8 else
9 slot.put_into("notice", _"Interest not existant")
10 end
11 return
12 end
14 if not interest then
15 interest = Interest:new()
16 interest.issue_id = issue_id
17 interest.member_id = app.session.member_id
18 interest.autoreject = false
19 end
21 local autoreject = param.get("autoreject", atom.boolean)
22 if autoreject ~= nil then
23 interest.autoreject = autoreject
24 end
26 interest:save()
28 slot.put_into("notice", _"Interest updated")

Impressum / About Us