<?php

class GuestMiddleware extends Middleware
{
    public function handle(): void
    {
        session_start();

        if (isset($_SESSION['admin_id'])) {
            header("Location: /admin");
            exit;
        }
    }
}
