<?php

namespace routes;

use classes\release_manager;
use traits\route_t;

class pingRoute
{
    use route_t;

    public function run(): void
    {
        $this->get('/ping', function () {
            global $response;
            $response->success([
                'message' => 'pong',
                'time' => date('c'),
                'backend_version' => release_manager::backendVersion(),
                'api_commit_sha' => release_manager::backendCommitSha(),
            ]);
        });
    }
}
