liquid_feedback_frontend
view app/main/initiative/_action/update_ignore.lua @ 1859:02c34183b6df
Fixed wrong filename in INSTALL file
author | bsw |
---|---|
date | Tue Nov 28 18:54:51 2023 +0100 (17 months ago) |
parents | 955bd41e1559 |
children |
line source
1 local member = app.session.member
2 local initiative = Initiative:by_id(param.get_id())
4 local ignore_initiative = IgnoredInitiative:by_pk(member.id, initiative.id)
6 if param.get("delete", atom.boolean) then
7 if ignore_initiative then
8 ignore_initiative:destroy()
9 end
10 return
11 end
13 if not ignore_initiative then
14 ignore_initiative = IgnoredInitiative:new()
15 ignore_initiative.member_id = member.id
16 ignore_initiative.initiative_id = initiative.id
17 ignore_initiative:save()
18 end