add: user headmap

This commit is contained in:
2021-05-27 10:30:34 +08:00
parent e716dba249
commit cacc807978
6 changed files with 321 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
json.total_contributions @headmaps.collect{|map| map["contributions"]}.reduce(0, :+)
json.headmaps @headmaps.each do |map|
json.date map["timestamp"]
json.contributions map["contributions"]
end