This commit is contained in:
2021-03-23 18:05:16 +08:00
parent 4137a817bb
commit 9523b00c7b
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -73,10 +73,10 @@ class Service extends Component
if (($node = router()->find_path($this->replace($request, $service))) === null) {
throw new Exception('Cmd not find.');
}
return serialize($node->dispatch());
return Json::encode($node->dispatch());
} catch (\Throwable $exception) {
$this->addError($exception);
return serialize(['state' => 'fail', 'message' => $exception->getMessage()]);
return Json::encode(['state' => 'fail', 'message' => $exception->getMessage()]);
}
});
}