1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Minor fix for missing default key

This commit is contained in:
Eldad Fux 2021-08-07 08:12:33 +03:00
parent a04096ec4a
commit 0dec65f979
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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'];