mirror of
https://github.com/dyzulk/trustlab-api.git
synced 2026-01-26 05:15:35 +07:00
feat: implement CDN Purge Artisan command and UI dashboard control
This commit is contained in:
@@ -942,4 +942,27 @@ class OpenSslService
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Purge everything under the 'ca/' directory on the CDN.
|
||||
*/
|
||||
public function purgeAllCaFromCdn()
|
||||
{
|
||||
$disk = Storage::disk('r2-public');
|
||||
|
||||
if ($disk->exists('ca')) {
|
||||
$disk->deleteDirectory('ca');
|
||||
}
|
||||
|
||||
// Reset local database sync status
|
||||
CaCertificate::query()->update([
|
||||
'last_synced_at' => null,
|
||||
'cert_path' => null,
|
||||
'der_path' => null,
|
||||
'bat_path' => null,
|
||||
'mac_path' => null,
|
||||
'linux_path' => null,
|
||||
]);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user