2222use OCA \Libresign \Service \DocMdp \ConfigService as DocMdpConfigService ;
2323use OCA \Libresign \Service \FooterService ;
2424use OCA \Libresign \Service \IdentifyMethodService ;
25- use OCA \Libresign \Service \Install \ConfigureCheckService ;
2625use OCA \Libresign \Service \Install \InstallService ;
2726use OCA \Libresign \Service \ReminderService ;
27+ use OCA \Libresign \Service \SetupCheckResultService ;
2828use OCA \Libresign \Service \SignatureBackgroundService ;
2929use OCA \Libresign \Service \SignatureTextService ;
3030use OCA \Libresign \Settings \Admin ;
@@ -71,7 +71,6 @@ class AdminController extends AEnvironmentAwareController {
7171 public function __construct (
7272 IRequest $ request ,
7373 private IAppConfig $ appConfig ,
74- private ConfigureCheckService $ configureCheckService ,
7574 private InstallService $ installService ,
7675 private CertificateEngineFactory $ certificateEngineFactory ,
7776 private IEventSourceFactory $ eventSourceFactory ,
@@ -86,6 +85,7 @@ public function __construct(
8685 private DocMdpConfigService $ docMdpConfigService ,
8786 private IdentifyMethodService $ identifyMethodService ,
8887 private FileMapper $ fileMapper ,
88+ private SetupCheckResultService $ setupCheckResultService ,
8989 ) {
9090 parent ::__construct (Application::APP_ID , $ request );
9191 $ this ->eventSource = $ this ->eventSourceFactory ->create ();
@@ -258,11 +258,9 @@ public function loadCertificate(): DataResponse {
258258 #[NoCSRFRequired]
259259 #[ApiRoute(verb: 'GET ' , url: '/api/{apiVersion}/admin/configure-check ' , requirements: ['apiVersion ' => '(v1) ' ])]
260260 public function configureCheck (): DataResponse {
261- /** @var LibresignConfigureChecksResponse $configureCheckList */
262- $ configureCheckList = array_values ($ this ->configureCheckService ->checkAll ());
263- return new DataResponse (
264- $ configureCheckList
265- );
261+ /** @var LibresignConfigureChecksResponse $checks */
262+ $ checks = $ this ->setupCheckResultService ->getFormattedChecks ();
263+ return new DataResponse ($ checks );
266264 }
267265
268266 /**
@@ -301,8 +299,7 @@ public function installAndValidate(): void {
301299 $ this ->installService ->installCfssl ($ async );
302300 }
303301
304- $ this ->configureCheckService ->disableCache ();
305- $ this ->eventSource ->send ('configure_check ' , $ this ->configureCheckService ->checkAll ());
302+ $ this ->eventSource ->send ('configure_check ' , $ this ->setupCheckResultService ->getFormattedChecks ());
306303 $ seconds = 0 ;
307304 while ($ this ->installService ->isDownloadWip ()) {
308305 $ totalSize = $ this ->installService ->getTotalSize ();
@@ -313,7 +310,7 @@ public function installAndValidate(): void {
313310 usleep (200000 ); // 0.2 seconds
314311 $ seconds += 0.2 ;
315312 if ($ seconds === 5.0 ) {
316- $ this ->eventSource ->send ('configure_check ' , $ this ->configureCheckService -> checkAll ());
313+ $ this ->eventSource ->send ('configure_check ' , $ this ->setupCheckResultService -> getFormattedChecks ());
317314 $ seconds = 0 ;
318315 }
319316 }
@@ -327,7 +324,7 @@ public function installAndValidate(): void {
327324 ]));
328325 }
329326
330- $ this ->eventSource ->send ('configure_check ' , $ this ->configureCheckService -> checkAll ());
327+ $ this ->eventSource ->send ('configure_check ' , $ this ->setupCheckResultService -> getFormattedChecks ());
331328 $ this ->eventSource ->send ('done ' , '' );
332329 $ this ->eventSource ->close ();
333330 // Nextcloud inject a lot of headers that is incompatible with SSE
@@ -564,7 +561,7 @@ public function signerName(
564561 float $ fontSize ,
565562 bool $ isDarkTheme ,
566563 string $ align ,
567- ): FileDisplayResponse |DataResponse {
564+ ): FileDisplayResponse |DataResponse {
568565 try {
569566 $ blob = $ this ->signatureTextService ->signerNameImage (
570567 width: $ width ,
0 commit comments