liquid_feedback_frontend
annotate app/main/api/profile_info.lua @ 1728:c06c22e8ee35
Allow to use newlines in unit/area description
| author | bsw | 
|---|---|
| date | Tue Sep 28 13:54:08 2021 +0200 (2021-09-28) | 
| parents | 32cc544d5a5b | 
| children | 
| rev | line source | 
|---|---|
| bsw/jbe@1309 | 1 slot.set_layout(nil, "application/json") | 
| bsw/jbe@1309 | 2 | 
| bsw/jbe@1309 | 3 local r = json.object() | 
| bsw/jbe@1309 | 4 | 
| bsw/jbe@1309 | 5 r.result = json.array() | 
| bsw/jbe@1309 | 6 for i, field in ipairs(config.member_profile_fields) do | 
| bsw/jbe@1309 | 7 table.insert(r.result, json.object{ | 
| bsw/jbe@1309 | 8 id = field.id, | 
| bsw/jbe@1309 | 9 name = field.name, | 
| bsw/jbe@1309 | 10 type = field.type | 
| bsw/jbe@1309 | 11 }) | 
| bsw/jbe@1309 | 12 end | 
| bsw/jbe@1309 | 13 | 
| bsw/jbe@1309 | 14 slot.put_into("data", json.export(r)) | 
| bsw/jbe@1309 | 15 slot.put_into("data", "\n") | 
| bsw/jbe@1309 | 16 |