liquid_feedback_frontend

annotate app/main/api/style.lua @ 1540:b0b557858fd8

Fixed access to non-existing session object in auth filter
author bsw
date Tue Oct 20 17:58:07 2020 +0200 (2020-10-20)
parents 32cc544d5a5b
children
rev   line source
bsw/jbe@1309 1 slot.set_layout(nil, "application/json")
bsw/jbe@1309 2
bsw/jbe@1309 3
bsw/jbe@1309 4 local r = json.object{
bsw/jbe@1309 5 color = json.object()
bsw/jbe@1309 6 }
bsw/jbe@1309 7
bsw/jbe@1309 8 local style = execute.chunk{ module = "style", chunk = "_style", params = { style = config.style } }
bsw/jbe@1309 9
bsw/jbe@1309 10 if style.color_md then
bsw/jbe@1309 11 r.color.md = {}
bsw/jbe@1309 12 for k, v in pairs(style.color_md) do
bsw/jbe@1309 13 r.color.md[k] = v
bsw/jbe@1309 14 end
bsw/jbe@1309 15 end
bsw/jbe@1309 16
bsw/jbe@1309 17 if style.color_rgb then
bsw/jbe@1309 18 r.color.rgb = {}
bsw/jbe@1309 19 for k, v in pairs(style.color_rgb) do
bsw/jbe@1309 20 r.color.rgb[k] = v
bsw/jbe@1309 21 end
bsw/jbe@1309 22 end
bsw/jbe@1309 23
bsw/jbe@1309 24 slot.put_into("data", json.export(json.object{ result = r }))

Impressum / About Us