From 37dd450425add66136d3055816d64c4dfa3b180b Mon Sep 17 00:00:00 2001 From: "fauzgabriel@gmail.com" Date: Wed, 29 Apr 2026 15:46:39 +0700 Subject: [PATCH] ihc Co-authored-by: Copilot --- app/Http/Controllers/Api/ProfileController.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.php index 6d8ed97..e2bf1a2 100644 --- a/app/Http/Controllers/Api/ProfileController.php +++ b/app/Http/Controllers/Api/ProfileController.php @@ -29,16 +29,12 @@ class ProfileController extends Controller $user = Auth::user(); $profile = $user->profile; - // $requestID = null; - // if($request->has('id')) { - // $requestID = $request->id; - // } + $requestID = $request->query('id'); - $profileId = $user->role === 'petani' ? $profile->id : $request->id; + $profileId = $user->role === 'petani' ? $profile->id : $requestID; $desaKelurahanId = null; if ($profile->role === 'fasilitator' || $profile->role === 'super_admin') { - $desaKelurahanId = $request->desa_kelurahan_id; $desaKelurahanId = $profile->desa_kelurahan_id; }