This commit is contained in:
Irwan Cahyono 2026-03-17 12:52:04 +07:00
commit 312d20ce18
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ public function update(Request $request, string $id): JSONResponse
'file_ktp' => ['nullable', 'file', 'mimes:jpg,jpeg,png,pdf', 'max:2048'],
'desa_kelurahan_id' => ['nullable', 'exists:master_desa_kelurahan,id'],
]);
$profile = Profile::where('user_id', Auth::id())->first();
if ($request->hasFile('file_kk')) {

View File

@ -19,7 +19,7 @@
Route::post('/logout', [\App\Http\Controllers\Api\AuthController::class, 'logout']);
// Route::get('/profile', [\App\Http\Controllers\Api\ProfileController::class, 'show']);
// Route::put('/profile/{id}', [\App\Http\Controllers\Api\ProfileController::class, 'update']);
Route::put('/profile/{id}', [\App\Http\Controllers\Api\ProfileController::class, 'update']);
Route::get('/profile/{id}/download/{type}', [\App\Http\Controllers\Api\ProfileController::class, 'downloadFile']);
Route::apiResource('/profile', \App\Http\Controllers\Api\ProfileController::class)->only(['show', 'update']);
});