liquid_feedback_frontend

view app/main/api/_issue.lua @ 1858:3d1f0464a3ea

Handle missing ldap.member.allowed function
author bsw
date Tue Sep 20 17:35:29 2022 +0200 (20 months ago)
parents 32cc544d5a5b
children
line source
1 local issues = param.get("issues", "table")
4 local fields = { "id", "area_id", "policy_id", "admin_notice", "external_reference", "state", "phase_finished", "created", "accepted", "half_frozen", "fully_frozen", "closed", "cleaned", "min_admission_time", "max_admission_time", "discussion_time", "verification_time", "voting_time", "latest_snapshot_id", "admission_snapshot_id", "half_freeze_snapshot_id", "full_freeze_snapshot_id", "population", "voter_count", "status_quo_schulze_rank" }
6 local r = json.array()
8 for i, issue in ipairs(issues) do
9 local ir = json.object()
10 for j, field in ipairs(fields) do
11 local value = issue[field]
12 if value == nil then
13 value = json.null
14 else
15 value = tostring(value)
16 end
17 ir[field] = value
18 end
19 r[#r+1] = ir
20 end
22 return r

Impressum / About Us