Publication initiale de RelaisSMS : documentation et sources nettoyees
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\CardDav\CardDavContactSyncService;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Throwable;
|
||||
|
||||
class CardDavSyncController extends Controller
|
||||
{
|
||||
public function __invoke(CardDavContactSyncService $syncService): RedirectResponse
|
||||
{
|
||||
try {
|
||||
$run = $syncService->sync();
|
||||
} catch (Throwable $exception) {
|
||||
return redirect()
|
||||
->route('contacts.index')
|
||||
->with('status', 'Synchronisation CardDAV en echec : '.$exception->getMessage());
|
||||
}
|
||||
|
||||
return redirect()
|
||||
->route('contacts.index')
|
||||
->with('status', $run->message ?? 'Synchronisation CardDAV terminee.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user