2021-05-27 10:30:34 +08:00
|
|
|
json.total_contributions @headmaps.collect{|map| map["contributions"]}.reduce(0, :+)
|
|
|
|
|
json.headmaps @headmaps.each do |map|
|
2021-05-28 15:36:05 +08:00
|
|
|
json.date Time.at(map["timestamp"].to_i).strftime("%Y-%m-%d")
|
2021-05-27 10:30:34 +08:00
|
|
|
json.contributions map["contributions"]
|
|
|
|
|
end
|