File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 329329 Route::get ('dashboard ' , [DeveloperOnboardingController::class, 'dashboard ' ])->name ('dashboard ' );
330330});
331331
332- Route::get ('test ' , function () {
333- logger ('TEST ' );
332+ Route::get ('test-sync/{id} ' , function (int $ id ) {
333+ $ plugin = \App \Models \Plugin::findOrFail ($ id );
334+ logger ('[TestSync] Starting ' , ['plugin_id ' => $ plugin ->id , 'name ' => $ plugin ->name ]);
335+
336+ $ syncService = new \App \Services \PluginSyncService ;
337+ $ result = $ syncService ->sync ($ plugin );
338+
339+ logger ('[TestSync] Done ' , ['result ' => $ result ]);
340+
341+ return response ()->json ([
342+ 'result ' => $ result ,
343+ 'last_synced_at ' => $ plugin ->fresh ()->last_synced_at ,
344+ 'has_readme ' => $ plugin ->fresh ()->readme_html !== null ,
345+ 'readme_length ' => strlen ($ plugin ->fresh ()->readme_html ?? '' ),
346+ ]);
334347});
You can’t perform that action at this time.
0 commit comments