add is_following field on user endpoint

This commit is contained in:
João Victor Geonizeli
2022-02-28 13:50:22 -03:00
parent a08a889e7d
commit c115da9a35
3 changed files with 22 additions and 0 deletions

View File

@@ -3,5 +3,6 @@ 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.is_following user.is_following?(@current_user)
json.url user_url(user, format: :json)