update rm deadcode
This commit is contained in:
@@ -14,6 +14,7 @@ use App\Services\ActivityLogger;
|
||||
use App\Services\Api\Client\ClientAuthService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Validation\Rules\Password;
|
||||
|
||||
/**
|
||||
* @OA\Tag(
|
||||
@@ -411,7 +412,7 @@ class ClientController extends Controller
|
||||
$data = $request->validate([
|
||||
'email' => ['required', 'email', 'max:255'],
|
||||
'token' => ['required', 'string', 'max:255'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
'password' => ['required', Password::min(10), 'confirmed'],
|
||||
]);
|
||||
|
||||
$customer = $this->authService->resetPassword($data);
|
||||
@@ -439,7 +440,17 @@ class ClientController extends Controller
|
||||
|
||||
abort_unless($path && str_starts_with($path, 'cccd/') && Storage::disk('local')->exists($path), 404);
|
||||
|
||||
return Storage::disk('local')->response($path, null, ['Cache-Control' => 'private, no-store']);
|
||||
$mime = match (strtolower(pathinfo($path, PATHINFO_EXTENSION))) {
|
||||
'png' => 'image/png',
|
||||
'webp' => 'image/webp',
|
||||
default => 'image/jpeg',
|
||||
};
|
||||
|
||||
return Storage::disk('local')->response($path, "cccd-{$side}", [
|
||||
'Content-Type' => $mime,
|
||||
'Content-Disposition' => "inline; filename=\"cccd-{$side}\"",
|
||||
'Cache-Control' => 'private, no-store',
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(ClientUpdateRequest $request)
|
||||
|
||||
Reference in New Issue
Block a user