decidim-bulletin_board 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '03922663d9b5541ee3f5e27ac57825b7306c4b4d876068d607ab6774ff61acdb'
|
4
|
+
data.tar.gz: d3c3569be3291c7ebbbe4b42aa8727ff172c486eb13ced87649ad6c93a18691f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25066d09cf994dc43f03f1100d7eedd54c5c386aeb7e58210ffe8219bf3ef363f20ff42e209867381cb8a823bee50eb9c2aa888e9d6a31a2d6e01a0bb2b3add5
|
7
|
+
data.tar.gz: f46fd917b4c8673414850410f05a04f997964ee005e30a384925d73a8374aa393b1cc2942ea4bfb67c59a7c85f6208ff7f1a490f8018b919cca3863726e710a1
|
data/Gemfile.lock
CHANGED
@@ -33,22 +33,25 @@ module Decidim
|
|
33
33
|
logEntries(types: args[:types]) do
|
34
34
|
signedData
|
35
35
|
end
|
36
|
+
verifiableResultsUrl
|
37
|
+
verifiableResultsHash
|
36
38
|
end
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
42
|
return broadcast(:error, "There aren't any log entries with type: 'end_tally' for this election.") if response.data.election.log_entries.empty?
|
41
43
|
|
42
|
-
@
|
44
|
+
@election = response.data.election
|
45
|
+
@signed_data = election.log_entries.first.signed_data
|
43
46
|
|
44
|
-
broadcast(:ok, decoded_data["results"])
|
47
|
+
broadcast(:ok, { election_results: decoded_data["results"], verifiable_results: verifiable_results })
|
45
48
|
rescue Graphlient::Errors::ServerError
|
46
49
|
broadcast(:error, "Sorry, something went wrong")
|
47
50
|
end
|
48
51
|
|
49
52
|
private
|
50
53
|
|
51
|
-
attr_reader :election_id, :types, :signed_data
|
54
|
+
attr_reader :election_id, :types, :signed_data, :election
|
52
55
|
|
53
56
|
def decoded_data
|
54
57
|
@decoded_data ||= begin
|
@@ -57,6 +60,13 @@ module Decidim
|
|
57
60
|
{ error: e.message }
|
58
61
|
end
|
59
62
|
end
|
63
|
+
|
64
|
+
def verifiable_results
|
65
|
+
{
|
66
|
+
url: election.verifiable_results_url,
|
67
|
+
hash: election.verifiable_results_hash
|
68
|
+
}
|
69
|
+
end
|
60
70
|
end
|
61
71
|
end
|
62
72
|
end
|