eee
This commit is contained in:
@@ -18,7 +18,7 @@ class Head extends AbstractRequestMethod implements InjectRouteInterface
|
||||
* @param string $path
|
||||
* @param string $version
|
||||
*/
|
||||
public function __construct(readonly public string $path, readonly public string $version = 'v1')
|
||||
public function __construct(readonly public string $path, readonly public string $version = '')
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@ class Head extends AbstractRequestMethod implements InjectRouteInterface
|
||||
{
|
||||
// TODO: Implement dispatch() method.
|
||||
$path = '/' . ltrim($this->path, '/');
|
||||
|
||||
if (!empty($this->version)) {
|
||||
$path = '/' . trim($this->version) . $path;
|
||||
}
|
||||
Router::addRoute(RequestMethod::REQUEST_HEAD, $path, [$class, $method]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user