feat: review comments
This commit is contained in:
parent
410597eca7
commit
f26f2d9e9b
1 changed files with 27 additions and 25 deletions
|
@ -304,6 +304,10 @@ App::init()
|
|||
|
||||
if (time() > $key->getAttribute('accessedAt', 0) + APP_KEY_ACCCESS) {
|
||||
$key->setAttribute('accessedAt', time());
|
||||
$dbForConsole->updateDocument('keys', $key->getId(), $key);
|
||||
$dbForConsole->deleteCachedDocument('projects', $project->getId());
|
||||
}
|
||||
|
||||
$sdkValidator = new WhiteList([
|
||||
'nodejs',
|
||||
'deno',
|
||||
|
@ -325,15 +329,13 @@ App::init()
|
|||
$sdks = $key->getAttribute('sdks', []);
|
||||
if (!in_array($sdk, $sdks)) {
|
||||
array_push($sdks, $sdk);
|
||||
}
|
||||
$key->setAttribute('sdks', $sdks);
|
||||
}
|
||||
|
||||
$dbForConsole->updateDocument('keys', $key->getId(), $key);
|
||||
$dbForConsole->deleteCachedDocument('projects', $project->getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Authorization::setRole('role:' . $role);
|
||||
|
||||
|
|
Loading…
Reference in a new issue