Moved most of rest routes config to their actions

This commit is contained in:
Alejandro Celaya
2018-05-01 18:28:37 +02:00
parent c9ce56eea5
commit ef3c4aadf2
12 changed files with 42 additions and 62 deletions

View File

@@ -12,7 +12,7 @@ use Psr\Log\NullLogger;
abstract class AbstractRestAction implements RequestHandlerInterface, RequestMethodInterface, StatusCodeInterface
{
protected const ROUTE_PATH = '';
protected const ALLOWED_METHODS = [];
protected const ROUTE_ALLOWED_METHODS = [];
/**
* @var LoggerInterface
@@ -30,7 +30,7 @@ abstract class AbstractRestAction implements RequestHandlerInterface, RequestMet
'name' => static::class,
'middleware' => \array_merge($prevMiddleware, [static::class], $postMiddleware),
'path' => static::ROUTE_PATH,
'allowed_methods' => static::ALLOWED_METHODS,
'allowed_methods' => static::ROUTE_ALLOWED_METHODS,
];
}
}