Commit 8cf07da3 authored by Maik Messerschmidt's avatar Maik Messerschmidt
Browse files

Improved submit-result command.

parent e6bc13be
......@@ -43,9 +43,15 @@ class SubmitResult extends Command
$data = fread($file, filesize($filename));
fclose($file);
$decoded = json_decode($data);
if ($decoded === null) {
$this->error("File doesn't contain valid JSON.");
return 1;
}
Result::create([
'id' => null,
'data' => $data,
'data' => $decoded,
'ip' => '127.0.0.1',
'session_id' => 'ARTISAN_COMMAND',
]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment