diff --git a/app/Services/RegisterService.php b/app/Services/RegisterService.php index d55fa7f..e69c876 100644 --- a/app/Services/RegisterService.php +++ b/app/Services/RegisterService.php @@ -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, + ], + ], ]; }); } diff --git a/app/Swagger/v1/RegisterApi.php b/app/Swagger/v1/RegisterApi.php index c7a428d..e4b9c0d 100644 --- a/app/Swagger/v1/RegisterApi.php +++ b/app/Swagger/v1/RegisterApi.php @@ -90,6 +90,19 @@ * @OA\Property(property="is_external", type="integer", example=0, description="외부 링크 여부 (0: 내부, 1: 외부)"), * @OA\Property(property="external_url", type="string", example=null, nullable=true, description="외부 링크 URL") * ) + * ), + * @OA\Property( + * property="roles", + * type="array", + * description="생성된 역할 목록 (시스템 관리자 역할 1개)", + * + * @OA\Items( + * type="object", + * + * @OA\Property(property="id", type="integer", example=1, description="역할 ID"), + * @OA\Property(property="name", type="string", example="system_manager", description="역할명"), + * @OA\Property(property="description", type="string", example="시스템 관리자", description="역할 설명") + * ) * ) * ) * )