<?php
namespace App\Controllers;

require_once BASE_PATH . '/app/helpers/permissions.php';

use App\Core\Database;

class ApiController
{
    public function submissions(): void
    {
        header('Content-Type: application/json');
        $db = Database::getInstance();
        echo json_encode(
            $db->query("SELECT id,title,stage FROM submissions")->fetchAll()
        );
    }
}
