<?php

namespace App\Modules\AdminSession\Application\Index;

use App\Modules\Shared\Domain\Bus\Query\QueryHandler;

final class AdminSessionGetterQueryHandler implements QueryHandler
{
    public function __construct(private AdminSessionGetter $inserter)
    {
    }

    public function __invoke(AdminSessionGetterQuery $query): AdminSessionGetterResponse
    {
        return $this->inserter->__invoke($query->token());
    }
}
