Skip to content

Commit b86e5a1

Browse files
committed
on Identity, only include stats for self
1 parent e4e3e44 commit b86e5a1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/esdb/identity.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
module ESDB
22
class Identity < ESDB::Resource
3+
def to_hash
4+
get! unless @response
5+
hash = JSON.parse(@response)
6+
7+
# Only include stats for ourself.
8+
hash['stats'] = hash['stats'][hash['id'].to_s]
9+
hash
10+
end
311
end
412
end

0 commit comments

Comments
 (0)