fixes manual internal id insertion
This commit is contained in:
parent
ec8c3b6bb8
commit
f8c9c2f39b
|
@ -146,6 +146,8 @@ App::post('/v1/account')
|
|||
'search' => implode(' ', [$userId, $email, $name]),
|
||||
'accessedAt' => DateTime::now(),
|
||||
]);
|
||||
// remove internalId from new user
|
||||
$user->removeAttribute('$internalId');
|
||||
Authorization::skip(fn() => $dbForProject->createDocument('users', $user));
|
||||
} catch (Duplicate) {
|
||||
throw new Exception(Exception::USER_ALREADY_EXISTS);
|
||||
|
@ -653,6 +655,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
|
|||
'search' => implode(' ', [$userId, $email, $name]),
|
||||
'accessedAt' => DateTime::now(),
|
||||
]);
|
||||
// Remove internalId from new user
|
||||
$user->removeAttribute('$internalId');
|
||||
Authorization::skip(fn() => $dbForProject->createDocument('users', $user));
|
||||
} catch (Duplicate) {
|
||||
$failureRedirect(Exception::USER_ALREADY_EXISTS);
|
||||
|
@ -955,6 +959,8 @@ App::post('/v1/account/sessions/magic-url')
|
|||
'accessedAt' => DateTime::now(),
|
||||
]);
|
||||
|
||||
// Remove internalId from new user
|
||||
$user->removeAttribute('$internalId');
|
||||
Authorization::skip(fn () => $dbForProject->createDocument('users', $user));
|
||||
}
|
||||
|
||||
|
@ -1284,6 +1290,8 @@ App::post('/v1/account/sessions/phone')
|
|||
'accessedAt' => DateTime::now(),
|
||||
]);
|
||||
|
||||
// Remove internalId from new user
|
||||
$user->removeAttribute('$internalId');
|
||||
Authorization::skip(fn () => $dbForProject->createDocument('users', $user));
|
||||
}
|
||||
|
||||
|
@ -1534,6 +1542,8 @@ App::post('/v1/account/sessions/anonymous')
|
|||
'search' => $userId,
|
||||
'accessedAt' => DateTime::now(),
|
||||
]);
|
||||
// Remove internalId from new user
|
||||
$user->removeAttribute('$internalId');
|
||||
Authorization::skip(fn() => $dbForProject->createDocument('users', $user));
|
||||
|
||||
// Create session token
|
||||
|
|
|
@ -1456,9 +1456,10 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
|
|||
|
||||
$deploymentId = ID::unique();
|
||||
|
||||
// Remove internalId from new deployment
|
||||
$deployment->removeAttribute('$internalId');
|
||||
$deployment = $dbForProject->createDocument('deployments', $deployment->setAttributes([
|
||||
'$id' => $deploymentId,
|
||||
'$internalId' => '',
|
||||
'buildId' => '',
|
||||
'buildInternalId' => '',
|
||||
'entrypoint' => $function->getAttribute('entrypoint'),
|
||||
|
|
|
@ -174,6 +174,8 @@ class CertificatesV1 extends Worker
|
|||
|
||||
$certificate = $this->dbForConsole->updateDocument('certificates', $certificate->getId(), $certificate);
|
||||
} else {
|
||||
// Remove internalId from new certificate
|
||||
$certificate->removeAttribute('$internalId');
|
||||
$certificate = $this->dbForConsole->createDocument('certificates', $certificate);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
"utopia-php/cache": "0.8.*",
|
||||
"utopia-php/cli": "0.15.*",
|
||||
"utopia-php/config": "0.2.*",
|
||||
"utopia-php/database": "0.43.0",
|
||||
"utopia-php/database": "0.43.*",
|
||||
"utopia-php/domains": "0.3.*",
|
||||
"utopia-php/dsn": "0.1.*",
|
||||
"utopia-php/framework": "0.31.0",
|
||||
|
|
165
composer.lock
generated
165
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "1fe72c576bd9209f9db6e56cac8cd16a",
|
||||
"content-hash": "ce37f32b5c3c12e85d8d67bad35f57d7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -386,79 +386,6 @@
|
|||
},
|
||||
"time": "2023-04-18T15:34:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/package-versions-deprecated",
|
||||
"version": "1.11.99.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/package-versions-deprecated.git",
|
||||
"reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d",
|
||||
"reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.1.0 || ^2.0",
|
||||
"php": "^7 || ^8"
|
||||
},
|
||||
"replace": {
|
||||
"ocramius/package-versions": "1.11.99"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^1.9.3 || ^2.0@dev",
|
||||
"ext-zip": "^1.13",
|
||||
"phpunit/phpunit": "^6.5 || ^7"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "PackageVersions\\Installer",
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PackageVersions\\": "src/PackageVersions"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marco Pivetta",
|
||||
"email": "ocramius@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/package-versions-deprecated/issues",
|
||||
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-01-17T14:14:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "dragonmantank/cron-expression",
|
||||
"version": "v3.3.2",
|
||||
|
@ -914,24 +841,28 @@
|
|||
},
|
||||
{
|
||||
"name": "jean85/pretty-package-versions",
|
||||
"version": "1.6.0",
|
||||
"version": "2.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Jean85/pretty-package-versions.git",
|
||||
"reference": "1e0104b46f045868f11942aea058cd7186d6c303"
|
||||
"reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303",
|
||||
"reference": "1e0104b46f045868f11942aea058cd7186d6c303",
|
||||
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af",
|
||||
"reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/package-versions-deprecated": "^1.8.0",
|
||||
"php": "^7.0|^8.0"
|
||||
"composer-runtime-api": "^2.0.0",
|
||||
"php": "^7.1|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.0|^8.5|^9.2"
|
||||
"friendsofphp/php-cs-fixer": "^2.17",
|
||||
"jean85/composer-provided-replaced-stub-package": "^1.0",
|
||||
"phpstan/phpstan": "^0.12.66",
|
||||
"phpunit/phpunit": "^7.5|^8.5|^9.4",
|
||||
"vimeo/psalm": "^4.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -954,7 +885,7 @@
|
|||
"email": "alessandro.lai85@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A wrapper for ocramius/package-versions to get pretty versions strings",
|
||||
"description": "A library to get pretty versions strings of installed dependencies",
|
||||
"keywords": [
|
||||
"composer",
|
||||
"package",
|
||||
|
@ -963,9 +894,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Jean85/pretty-package-versions/issues",
|
||||
"source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0"
|
||||
"source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5"
|
||||
},
|
||||
"time": "2021-02-04T16:20:16+00:00"
|
||||
"time": "2021-10-08T21:21:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
|
@ -1188,34 +1119,35 @@
|
|||
},
|
||||
{
|
||||
"name": "mongodb/mongodb",
|
||||
"version": "1.8.0",
|
||||
"version": "1.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mongodb/mongo-php-library.git",
|
||||
"reference": "953dbc19443aa9314c44b7217a16873347e6840d"
|
||||
"reference": "b0bbd657f84219212487d01a8ffe93a789e1e488"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d",
|
||||
"reference": "953dbc19443aa9314c44b7217a16873347e6840d",
|
||||
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/b0bbd657f84219212487d01a8ffe93a789e1e488",
|
||||
"reference": "b0bbd657f84219212487d01a8ffe93a789e1e488",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-hash": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mongodb": "^1.8.1",
|
||||
"jean85/pretty-package-versions": "^1.2",
|
||||
"php": "^7.0 || ^8.0",
|
||||
"ext-mongodb": "^1.11.0",
|
||||
"jean85/pretty-package-versions": "^1.2 || ^2.0.1",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"symfony/polyfill-php80": "^1.19"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3.5, <3.5.5",
|
||||
"symfony/phpunit-bridge": "5.x-dev"
|
||||
"doctrine/coding-standard": "^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.6",
|
||||
"symfony/phpunit-bridge": "^5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8.x-dev"
|
||||
"dev-master": "1.10.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1250,9 +1182,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/mongodb/mongo-php-library/issues",
|
||||
"source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0"
|
||||
"source": "https://github.com/mongodb/mongo-php-library/tree/1.10.0"
|
||||
},
|
||||
"time": "2020-11-25T12:26:02+00:00"
|
||||
"time": "2021-10-20T22:22:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mustangostang/spyc",
|
||||
|
@ -2220,16 +2152,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.43.0",
|
||||
"version": "0.43.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "fb96fc6c94d5efcd43913c34bece62daba76a5e9"
|
||||
"reference": "f2626acd42665a9987c94af1c93bf20c28d55c9d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/fb96fc6c94d5efcd43913c34bece62daba76a5e9",
|
||||
"reference": "fb96fc6c94d5efcd43913c34bece62daba76a5e9",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/f2626acd42665a9987c94af1c93bf20c28d55c9d",
|
||||
"reference": "f2626acd42665a9987c94af1c93bf20c28d55c9d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2238,12 +2170,11 @@
|
|||
"php": ">=8.0",
|
||||
"utopia-php/cache": "0.8.*",
|
||||
"utopia-php/framework": "0.*.*",
|
||||
"utopia-php/mongo": "0.2.*"
|
||||
"utopia-php/mongo": "0.3.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.14",
|
||||
"laravel/pint": "1.4.*",
|
||||
"mongodb/mongodb": "1.8.0",
|
||||
"pcov/clobber": "^2.0",
|
||||
"phpstan/phpstan": "1.10.*",
|
||||
"phpunit/phpunit": "^9.4",
|
||||
|
@ -2271,9 +2202,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.43.0"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.43.2"
|
||||
},
|
||||
"time": "2023-08-29T10:18:39+00:00"
|
||||
"time": "2023-09-07T19:04:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
|
@ -2691,21 +2622,21 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/mongo",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/mongo.git",
|
||||
"reference": "b6dfb31b93c07c59b8bbd62a3b52e3b97a407c09"
|
||||
"reference": "52326a9a43e2d27ff0c15c48ba746dacbe9a7aee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/mongo/zipball/b6dfb31b93c07c59b8bbd62a3b52e3b97a407c09",
|
||||
"reference": "b6dfb31b93c07c59b8bbd62a3b52e3b97a407c09",
|
||||
"url": "https://api.github.com/repos/utopia-php/mongo/zipball/52326a9a43e2d27ff0c15c48ba746dacbe9a7aee",
|
||||
"reference": "52326a9a43e2d27ff0c15c48ba746dacbe9a7aee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mongodb": "*",
|
||||
"mongodb/mongodb": "1.8.0",
|
||||
"mongodb/mongodb": "1.10.0",
|
||||
"php": ">=8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -2745,9 +2676,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/mongo/issues",
|
||||
"source": "https://github.com/utopia-php/mongo/tree/0.2.0"
|
||||
"source": "https://github.com/utopia-php/mongo/tree/0.3.1"
|
||||
},
|
||||
"time": "2023-03-22T10:44:29+00:00"
|
||||
"time": "2023-09-01T17:25:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/orchestration",
|
||||
|
@ -4261,16 +4192,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "9.2.27",
|
||||
"version": "9.2.28",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1"
|
||||
"reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1",
|
||||
"reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef",
|
||||
"reference": "7134a5ccaaf0f1c92a4f5501a6c9f98ac4dcc0ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4327,7 +4258,7 @@
|
|||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.28"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -4335,7 +4266,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-07-26T13:44:30+00:00"
|
||||
"time": "2023-09-12T14:36:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
|
Loading…
Reference in a new issue