Save a SEO title and description when creating an incident

This commit is contained in:
Nico Stapelbroek
2018-03-06 19:38:52 +01:00
parent 0fcd939f50
commit 129030daaf
3 changed files with 14 additions and 1 deletions

View File

@@ -104,6 +104,10 @@ class CreateIncidentCommandHandler
// Store any meta?
if ($meta = $command->meta) {
foreach ($meta as $key => $value) {
if (empty($value)) {
continue;
}
Meta::create([
'key' => $key,
'value' => $value,

View File

@@ -131,7 +131,8 @@ class IncidentController extends Controller
Binput::get('stickied', false),
Binput::get('occurred_at'),
null,
[]
[],
['seo' => Binput::get('seo', [])]
));
} catch (ValidationException $e) {
return cachet_redirect('dashboard.incidents.create')