mirror of
https://github.com/Karaka-Management/oms-Notification.git
synced 2026-02-16 16:38:40 +00:00
code fixes
This commit is contained in:
parent
155b1ca196
commit
5b43c81993
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user