Minor fix for missing default key
This commit is contained in:
parent
a04096ec4a
commit
0dec65f979
|
@ -73,7 +73,7 @@ App::post('/v1/projects')
|
|||
}
|
||||
|
||||
$auth = Config::getParam('auth', []);
|
||||
$auths = [];
|
||||
$auths = ['limit' => 0];
|
||||
foreach ($auth as $index => $method) {
|
||||
$auths[$method['key'] ?? ''] = true;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ class Project extends Model
|
|||
$authValues = $document->getAttribute('auths',[]);
|
||||
$auth = Config::getParam('auth', []);
|
||||
|
||||
$document->setAttribute('authLimit', $authValues['limit']);
|
||||
$document->setAttribute('authLimit', $authValues['limit'] ?? 0);
|
||||
|
||||
foreach ($auth as $index => $method) {
|
||||
$key = $method['key'];
|
||||
|
|
Loading…
Reference in a new issue