code fixes

This commit is contained in:
Dennis Eichhorn 2024-03-15 20:24:38 +00:00
parent 155b1ca196
commit 5b43c81993
7 changed files with 26 additions and 35 deletions

View File

@ -14,10 +14,7 @@ declare(strict_types=1);
namespace Modules\Notification\Admin; namespace Modules\Notification\Admin;
use phpOMS\Application\ApplicationAbstract;
use phpOMS\Config\SettingsInterface;
use phpOMS\Module\InstallerAbstract; use phpOMS\Module\InstallerAbstract;
use phpOMS\Module\ModuleInfo;
/** /**
* Installer class. * Installer class.
@ -36,12 +33,4 @@ final class Installer extends InstallerAbstract
* @since 1.0.0 * @since 1.0.0
*/ */
public const PATH = __DIR__; public const PATH = __DIR__;
/**
* {@inheritdoc}
*/
public static function install(ApplicationAbstract $app, ModuleInfo $info, SettingsInterface $cfgHandler) : void
{
parent::install($app, $info, $cfgHandler);
}
} }

View File

@ -47,6 +47,8 @@ final class ApiController extends Controller
public function apiNotificationSeenCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void public function apiNotificationSeenCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
{ {
$now = new \DateTimeImmutable('now'); $now = new \DateTimeImmutable('now');
/** @var \Modules\Notification\Models\Notification[] $notifications */
$notifications = NotificationMapper::getAll() $notifications = NotificationMapper::getAll()
->where('createdFor', $request->header->account) ->where('createdFor', $request->header->account)
->where('seenAt', null) ->where('seenAt', null)