Add conditional check for self-request in userRoute and fix customer_number type in orderBookingRoute
- Updated `getUserId` logic in `userRoute` to allow users to fetch their own user ID without requiring additional permissions. - Corrected `customer_number` type in `orderBookingRoute` to always return an array.
This commit is contained in:
@@ -110,7 +110,7 @@ class orderBookingRoute
|
||||
'department' => $user->getGroup()->getDepartments()
|
||||
] : []),
|
||||
...(!$has_permission_other ? [
|
||||
'customer_number' => (int)$user->customer_number->value()
|
||||
'customer_number' => [(int)$user->customer_number->value()]
|
||||
] : [])
|
||||
])
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user