liquid_feedback_frontend
diff app/main/interest/_action/xhr_update.lua @ 1618:2f9e1e882de6
Add/remove interest via fetch
author | bsw |
---|---|
date | Mon Feb 01 23:43:54 2021 +0100 (2021-02-01) |
parents | |
children | 4188405c2425 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/interest/_action/xhr_update.lua Mon Feb 01 23:43:54 2021 +0100 1.3 @@ -0,0 +1,9 @@ 1.4 +local issue_id = param.get("issue_id", atom.integer) 1.5 +local interested = param.get("interested", atom.boolean) 1.6 + 1.7 +slot.set_layout() 1.8 + 1.9 +if not Interest:update(issue_id, app.session.member, interested) then 1.10 + request.set_status("500 Internal Server Error") 1.11 +end 1.12 +