Add System::jsonExit()

pull/8194/head
nupplaPhil 2020-01-28 23:36:28 +01:00
rodzic c2b8c65104
commit d1b7bfda4b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D8365C3D36B77D90
1 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -46,14 +46,11 @@ class Notification extends BaseModule
try {
$success = DI::notify()->setAllSeen();
}catch (\Exception $e) {
DI::logger()->warning('set all seen failed.', ['exception' => $e]);
$success = false;
}
header('Content-type: application/json; charset=utf-8');
echo json_encode([
'result' => ($success) ? 'success' : 'fail',
]);
exit();
System::jsonExit(['result' => (($success) ? 'success' : 'fail')]);
}
}
@ -83,7 +80,6 @@ class Notification extends BaseModule
DI::baseUrl()->redirect();
}
// @TODO: Replace with parameter from router
DI::baseUrl()->redirect('notifications/system');
}
}