Fixed prefix for REST APIs
This commit is contained in:
@ -291,6 +291,7 @@ class Bootstrap implements BootstrapInterface
|
||||
$config = [
|
||||
'class' => 'yii\web\GroupUrlRule',
|
||||
'prefix' => $module->adminRestPrefix,
|
||||
'routePrefix' => $module->adminRestRoutePrefix,
|
||||
'rules' => $rules,
|
||||
];
|
||||
$rule = Yii::createObject($config);
|
||||
|
||||
@ -260,9 +260,13 @@ class Module extends BaseModule
|
||||
*/
|
||||
public $authenticatorClass = 'yii\filters\auth\QueryParamAuth';
|
||||
/**
|
||||
* @var string Route prefix for REST admin controller.
|
||||
* @var string Prefix for the pattern part of every rule for REST admin controller.
|
||||
*/
|
||||
public $adminRestPrefix = 'user/api/v1';
|
||||
/**
|
||||
* @var string Prefix for the route part of every rule for REST admin controller.
|
||||
*/
|
||||
public $adminRestRoutePrefix = 'user/api/v1';
|
||||
/**
|
||||
* @var array Routes for REST admin controller.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user