X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e1065adc610f3094a22d43dddad5ffa04338ec38..6982903ae791702453bfa3f3a1cb9bfcf342fa2d:/app/views/api/users/_user.json.jbuilder diff --git a/app/views/api/users/_user.json.jbuilder b/app/views/api/users/_user.json.jbuilder index 8423353dd..1a339f628 100644 --- a/app/views/api/users/_user.json.jbuilder +++ b/app/views/api/users/_user.json.jbuilder @@ -1,7 +1,7 @@ json.user do json.id user.id json.display_name user.display_name - json.account_created user.creation_time.xmlschema + json.account_created user.created_at.xmlschema json.description user.description if user.description if current_user && current_user == user && can?(:details, User) @@ -46,7 +46,7 @@ json.user do end if current_user && current_user == user && can?(:details, User) - if user.home_lat && user.home_lon + if user.home_location? json.home do json.lat user.home_lat json.lon user.home_lon @@ -65,5 +65,7 @@ json.user do json.count user.sent_messages.size end end + + json.email user.email if scope_enabled?(:read_email) end end