diff --git a/log-api/index.php b/log-api/index.php index 8519c6c..d846f82 100644 --- a/log-api/index.php +++ b/log-api/index.php @@ -49,6 +49,14 @@ if ($handle = opendir($req)) { $d['attempts'][$attempt] = []; } $d['attempts'][$attempt]['metadata'] = $metadata; + } elseif (substr($entry, -strlen(".result.json"),strlen(".result.json")) == ".result.json") { + $metadata = json_decode(file_get_contents($req . '/' . $entry), JSON_OBJECT_AS_ARRAY); + $attempt = $metadata['attempt_id']; + if (!isset($d['attempts'][$attempt])) { + $d['attempts'][$attempt] = []; + } + $d['attempts'][$attempt]['result'] = $metadata; + } else { if (!isset($d['attempts'][$entry])) { $d['attempts'][$entry] = [];