liquid_feedback_frontend
view app/main/area/_action/update_ignore.lua @ 1478:8c9f7f9152ce
Fixed redirecting after delegation change
author | bsw |
---|---|
date | Thu Oct 18 17:54:48 2018 +0200 (2018-10-18) |
parents | 55132e0324a4 |
children |
line source
1 local area_id = assert(param.get("area_id", atom.integer), "no area id given")
4 local ignored_area = IgnoredArea:by_pk(app.session.member_id, area_id)
6 if param.get("delete", atom.boolean) then
7 if ignored_area then
8 ignored_area:destroy()
9 slot.select("notice", function() ui.tag{ content = _"You have been subscribed for update emails about this subject area" } end)
10 end
11 return
12 end
14 if not ignored_area then
15 local ignored_area = IgnoredArea:new()
16 ignored_area.member_id = app.session.member_id
17 ignored_area.area_id = area_id
18 ignored_area:save()
19 slot.select("notice", function() ui.tag{ content = _"You will no longer receive update emails about this subject area" } end )
21 end