refactor(catalog,contacts): rewrite legacy-era regions of the domain routes and portal controllers in place

This commit is contained in:
Darko Gjorgjijoski
2026-08-20 21:50:27 +02:00
parent dd8cb9f274
commit 2b4de6bd09
6 changed files with 26 additions and 15 deletions
@@ -9,7 +9,6 @@ use App\Domains\Contacts\Http\Requests\CustomerPortal\CustomerProfileRequest;
use App\Domains\Contacts\Http\Resources\CustomerPortal\CustomerResource;
use App\Platform\Http\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ProfileController extends Controller
{
@@ -20,7 +19,7 @@ class ProfileController extends Controller
public function updateProfile(Company $company, CustomerProfileRequest $request)
{
$customer = Auth::guard('customer')->user();
$customer = auth('customer')->user();
$customer = $this->customerService->updateProfile(
customer: $customer,
@@ -43,13 +42,11 @@ class ProfileController extends Controller
);
}
return new CustomerResource($customer);
return CustomerResource::make($customer);
}
public function getUser(Request $request)
{
$customer = Auth::guard('customer')->user();
return new CustomerResource($customer);
return CustomerResource::make(auth('customer')->user());
}
}