fix : 테넌트 없는 회원 처리 및 테넌트 등록시 해당 테넌트 디폴트값 설정
This commit is contained in:
@@ -257,6 +257,16 @@ public static function storeTenants(array $params = [])
|
||||
|
||||
$tenant = Tenant::create($payload);
|
||||
|
||||
// 성성된 테넌트를 나의 테넌트로 셋팅
|
||||
$apiUser = app('api_user');
|
||||
UserTenant::create([
|
||||
'user_id' => $apiUser,
|
||||
'tenant_id' => $tenant->id,
|
||||
'is_active' => 0,
|
||||
'is_default' => 1,
|
||||
'joined_at' => now(),
|
||||
]);
|
||||
|
||||
// 생성된 리소스를 그대로 반환 (목록 카드용 요약 원하면 컬럼 제한)
|
||||
return ApiResponse::response('result', $tenant);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user