<?php

class DefaultController extends Controller
{
    public function __construct($name, $request)
    {
        parent::__construct($name, $request);
    }


    // ==============
    // Actions
    // ==============

    public function processRequest()
    {
        if ($this->request->getHttpMethod()=="GET" && empty($this->request->getUriParams())) {
            return Response::errorResponse('{ "message" : "Please visit the API documentation at https://gvipers.imt-lille-douai.fr/QVrel/projet-cdaw/tree/master/doc."}');
        }
        return Response::errorResponse('{ "message" : "Unsupported endpoint"}');
    }
}
