# HG changeset patch # User bsw # Date 1585064900 -3600 # Node ID 50f5b8a97f9106106719cdb753aa54f12ca4d050 # Parent a59dd2ae9cd89c77f4dea857287747a8232f04a4 Added support for embedding initiatives diff -r a59dd2ae9cd8 -r 50f5b8a97f91 app/main/api/embed_initiative.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/main/api/embed_initiative.lua Tue Mar 24 16:48:20 2020 +0100 @@ -0,0 +1,8 @@ +if app.scopes.identification then + app.session.member_id = app.access_token.member_id + app.session:save() + request.redirect{ external = request.get_absolute_baseurl() .. "initiative/show/" .. param.get("id") .. ".html" } +else + slot.put("missing access token or scope") +end + diff -r a59dd2ae9cd8 -r 50f5b8a97f91 env/request/router.lua --- a/env/request/router.lua Tue Feb 11 15:29:46 2020 +0100 +++ b/env/request/router.lua Tue Mar 24 16:48:20 2020 +0100 @@ -10,7 +10,8 @@ profile = true, settings_info = true, settings = true, - event = true + event = true, + embed_initiative = true } function request.router()