mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -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,
|
||||
'jobtitle' => e($user->jobtitle),
|
||||
'email' => e($user->email),
|
||||
'department' => ($user->department) ? [
|
||||
'id' => (int) $user->department->id,
|
||||
'name'=> e($user->department->name)
|
||||
] : null,
|
||||
'location' => (new LocationsTransformer)->transformLocation($user->userloc),
|
||||
'permissions' => $user->decodePermissions(),
|
||||
'activated' => ($user->activated =='1') ? true : false,
|
||||
|
|
Loading…
Reference in a new issue