feat: review comments

This commit is contained in:
Christy Jacob
2022-08-09 01:12:13 +05:30
parent 1dc9f5e842
commit 82e39ccf52
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -302,7 +302,7 @@ App::init()
Authorization::setRole('role:' . Auth::USER_ROLE_APP);
Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys.
if (time() > ($key->getAttribute('accessedAt', 0) + (24 * 60 * 60))) {
if (time() > $key->getAttribute('accessedAt', 0) + APP_KEY_USAGE) {
$key->setAttribute('accessedAt', time());
$sdkValidator = new WhiteList([
'appwrite:nodejs',
+1
View File
@@ -88,6 +88,7 @@ const APP_LIMIT_COMPRESSION = 20000000; //20MB
const APP_LIMIT_ARRAY_PARAMS_SIZE = 100; // Default maximum of how many elements can there be in API parameter that expects array value
const APP_LIMIT_ARRAY_ELEMENT_SIZE = 4096; // Default maximum length of element in array parameter represented by maximum URL length.
const APP_LIMIT_SUBQUERY = 1000;
const APP_KEY_USAGE = 24 * 60 * 60; // 24 hours
const APP_CACHE_BUSTER = 402;
const APP_VERSION_STABLE = '0.15.3';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
@@ -69,6 +69,7 @@ class Key extends Model
'description' => 'List of SDK user agents that used this key.',
'default' => null,
'example' => 'appwrite:flutter',
'array' => true
])
;
}