mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Added dept to User API transformer
This commit is contained in:
parent
e9c39add4f
commit
b223630f72
|
@ -32,6 +32,10 @@ class UsersTransformer
|
||||||
'groups' => $user->groups,
|
'groups' => $user->groups,
|
||||||
'jobtitle' => e($user->jobtitle),
|
'jobtitle' => e($user->jobtitle),
|
||||||
'email' => e($user->email),
|
'email' => e($user->email),
|
||||||
|
'department' => ($user->department) ? [
|
||||||
|
'id' => (int) $user->department->id,
|
||||||
|
'name'=> e($user->department->name)
|
||||||
|
] : null,
|
||||||
'location' => (new LocationsTransformer)->transformLocation($user->userloc),
|
'location' => (new LocationsTransformer)->transformLocation($user->userloc),
|
||||||
'permissions' => $user->decodePermissions(),
|
'permissions' => $user->decodePermissions(),
|
||||||
'activated' => ($user->activated =='1') ? true : false,
|
'activated' => ($user->activated =='1') ? true : false,
|
||||||
|
|
Loading…
Reference in a new issue