docbrown/app/views/api/v0/shared/_follows.json.jbuilder
Fernando Valverde 815b98168e
Include user_id fields in a couple API endpoint responses (#18214)
* Include user_id fields in a couple API responses

* Replace v0 partial within API v1 jbuilder views
2022-08-03 10:51:35 -06:00

5 lines
220 B
Ruby

json.user_id user.id
json.name user.name
json.path "/#{user.path.delete_prefix('/')}"
json.username user.try(:username) || user.name
json.profile_image user.profile_image_url_for(length: 60)