change json contract

This commit is contained in:
João Victor Geonizeli
2022-02-28 12:40:17 -03:00
parent bf3253dc9e
commit aa0e1ac1c7
4 changed files with 14 additions and 4 deletions

View File

@@ -1,2 +1,7 @@
json.extract! user, :id, :username, :created_at, :updated_at
json.extract! user, :id, :username
json.joined_at user.created_at.strftime("%B %d, %Y")
json.following_count user.following.count
json.follower_count user.followers.count
json.posts_count user.posts.count
json.url user_url(user, format: :json)