fix: service status indicator + oauth saving

This commit is contained in:
Andras Bacsai
2024-12-13 12:03:05 +01:00
parent 2a77d9d8ce
commit 4901b12279
11 changed files with 47 additions and 36 deletions

View File

@@ -1072,7 +1072,7 @@ class ServicesController extends Controller
if (! $service) {
return response()->json(['message' => 'Service not found.'], 404);
}
if (str($service->status())->contains('running')) {
if (str($service->status)->contains('running')) {
return response()->json(['message' => 'Service is already running.'], 400);
}
StartService::dispatch($service);
@@ -1150,7 +1150,7 @@ class ServicesController extends Controller
if (! $service) {
return response()->json(['message' => 'Service not found.'], 404);
}
if (str($service->status())->contains('stopped') || str($service->status())->contains('exited')) {
if (str($service->status)->contains('stopped') || str($service->status)->contains('exited')) {
return response()->json(['message' => 'Service is already stopped.'], 400);
}
StopService::dispatch($service);