Make single user API endpoint return Entities::User instead of Entities::UserBasic
This commit is contained in:
parent
540eb0a9af
commit
141b8b67ff
2 changed files with 8 additions and 1 deletions
|
@ -123,6 +123,13 @@ Parameters:
|
||||||
"name": "John Smith",
|
"name": "John Smith",
|
||||||
"state": "active",
|
"state": "active",
|
||||||
"avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
|
"avatar_url": "http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
|
||||||
|
"created_at": "2012-05-23T08:00:58Z",
|
||||||
|
"is_admin": false,
|
||||||
|
"bio": null,
|
||||||
|
"skype": "",
|
||||||
|
"linkedin": "",
|
||||||
|
"twitter": "",
|
||||||
|
"website_url": ""
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ module API
|
||||||
if current_user.is_admin?
|
if current_user.is_admin?
|
||||||
present @user, with: Entities::UserFull
|
present @user, with: Entities::UserFull
|
||||||
else
|
else
|
||||||
present @user, with: Entities::UserBasic
|
present @user, with: Entities::User
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue