fix: 회원가입 API 응답 구조 개선
- RegisterService: roles 응답에서 permissions 배열 제거 - menus 배열로 접근 가능한 메뉴 확인 가능하므로 중복 제거 - Swagger 문서 업데이트 (permissions 스키마 제거)
This commit is contained in:
@@ -30,7 +30,7 @@ class RegisterService
|
||||
* 'company_scale' => string (optional),
|
||||
* 'industry' => string (optional),
|
||||
* ]
|
||||
* @return array ['user' => array, 'tenant' => array]
|
||||
* @return array ['user' => array, 'tenant' => array, 'menus' => array, 'roles' => array]
|
||||
*/
|
||||
public static function register(array $params): array
|
||||
{
|
||||
@@ -113,7 +113,7 @@ public static function register(array $params): array
|
||||
->get(['id', 'parent_id', 'name', 'url', 'icon', 'sort_order', 'is_external', 'external_url'])
|
||||
->toArray();
|
||||
|
||||
// 12. Return user, tenant, and menus data
|
||||
// 12. Return user, tenant, menus, and roles data
|
||||
return [
|
||||
'user' => [
|
||||
'id' => $user->id,
|
||||
@@ -131,6 +131,13 @@ public static function register(array $params): array
|
||||
'options' => $tenant->options,
|
||||
],
|
||||
'menus' => $menus,
|
||||
'roles' => [
|
||||
[
|
||||
'id' => $role->id,
|
||||
'name' => $role->name,
|
||||
'description' => $role->description,
|
||||
],
|
||||
],
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user