template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent dc41245272
commit 720351e4c2
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ final class ApiController extends Controller
->where('seenAt', null)
->where('createdAt', $now, '<') // Don't show pre-created notifications
->sort('createdAt', OrderType::ASC)
->execute();
->executeGetArray();
foreach ($notifications as $notification) {
$new = clone $notification;
@ -88,7 +88,7 @@ final class ApiController extends Controller
->where('createdAt', $now, '<') // Don't show pre-created notifications
->where('createdAt', $request->getDataDateTime('start') ?? $now->modify('-1 hour'), '>')
->sort('createdAt', OrderType::ASC)
->execute();
->executeGetArray();
$response->header->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true);
$response->data[$request->uri->__toString()] = [

View File

@ -56,7 +56,7 @@ final class BackendController extends Controller implements DashboardElementInte
->where('seenAt', null)
->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications
->sort('createdAt', OrderType::ASC)
->execute();
->executeGetArray();
return $view;
}
@ -76,7 +76,7 @@ final class BackendController extends Controller implements DashboardElementInte
->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications
->sort('createdAt', OrderType::ASC)
->limit(5)
->execute();
->executeGetArray();
return $view;
}