Fix RSS feed where no component, add RSS discovery

This commit is contained in:
James Brooks
2014-12-20 17:28:36 +00:00
parent db78fe9341
commit c9b4bd51c4
2 changed files with 8 additions and 1 deletions

View File

@@ -14,10 +14,16 @@ class RSSController extends Controller {
]);
Incident::get()->map(function($incident) use ($feed) {
$componentName = null;
$component = $incident->component;
if ($component) {
$componentName = $component->name;
}
$feed->item([
'title' => $incident->name,
'message' => $incident->message,
'component' => $incident->component->name,
'component' => $componentName,
'status' => $incident->humanStatus,
'created_at' => $incident->created_at,
'updated_at' => $incident->updated_at