Merge branch 'feat-database-indexing' of https://github.com/appwrite/appwrite into feat-db-refactor-ui-fixes
This commit is contained in:
commit
0a38f0776a
6 changed files with 133 additions and 127 deletions
|
@ -1718,12 +1718,12 @@ App::get('/v1/database/collections/:collectionId/documents')
|
|||
return Query::parse($query);
|
||||
}, $queries);
|
||||
|
||||
// TODO@kodumbeats use strict query validation
|
||||
$validator = new QueriesValidator(new QueryValidator($collection->getAttribute('attributes', [])), $collection->getAttribute('indexes', []), false);
|
||||
|
||||
if (!empty($queries)) {
|
||||
$validator = new QueriesValidator(new QueryValidator($collection->getAttribute('attributes', [])), $collection->getAttribute('indexes', []), true);
|
||||
if (!$validator->isValid($queries)) {
|
||||
throw new Exception($validator->getDescription(), 400);
|
||||
}
|
||||
}
|
||||
|
||||
$cursorDocument = null;
|
||||
if (!empty($cursor)) {
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"utopia-php/cache": "0.4.*",
|
||||
"utopia-php/cli": "0.11.*",
|
||||
"utopia-php/config": "0.2.*",
|
||||
"utopia-php/database": "0.11.*",
|
||||
"utopia-php/database": "0.12.*",
|
||||
"utopia-php/locale": "0.4.*",
|
||||
"utopia-php/orchestration": "0.2.*",
|
||||
"utopia-php/registry": "0.5.*",
|
||||
|
|
73
composer.lock
generated
73
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": "8427bbf013694d9771cd09341a81562e",
|
||||
"content-hash": "7e24a95bc534ed39b042f19b27268de9",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
@ -1591,16 +1591,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v2.4.0",
|
||||
"version": "v2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
||||
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
|
||||
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1609,7 +1609,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.4-dev"
|
||||
"dev-main": "2.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
@ -1638,7 +1638,7 @@
|
|||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -1654,7 +1654,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-03-23T23:28:01+00:00"
|
||||
"time": "2021-07-12T14:48:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
|
@ -2138,16 +2138,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/database",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "5fc0476d05567d1a156b00e17033f32148c93a38"
|
||||
"reference": "102ee1d21fd55fc92dc7a07b60672a98ae49be26"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/5fc0476d05567d1a156b00e17033f32148c93a38",
|
||||
"reference": "5fc0476d05567d1a156b00e17033f32148c93a38",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/102ee1d21fd55fc92dc7a07b60672a98ae49be26",
|
||||
"reference": "102ee1d21fd55fc92dc7a07b60672a98ae49be26",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2195,9 +2195,9 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/0.11.0"
|
||||
"source": "https://github.com/utopia-php/database/tree/0.12.0"
|
||||
},
|
||||
"time": "2021-11-17T09:53:02+00:00"
|
||||
"time": "2021-11-24T14:53:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
|
@ -4102,16 +4102,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "9.2.8",
|
||||
"version": "9.2.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e"
|
||||
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
|
||||
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
|
||||
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -4167,7 +4167,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -4175,7 +4175,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-30T08:01:38+00:00"
|
||||
"time": "2021-11-19T15:21:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
@ -5587,16 +5587,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v5.3.10",
|
||||
"version": "v5.3.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
|
||||
"reference": "3e7ab8f5905058984899b05a4648096f558bfeba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba",
|
||||
"reference": "3e7ab8f5905058984899b05a4648096f558bfeba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -5609,7 +5609,6 @@
|
|||
"symfony/string": "^5.1"
|
||||
},
|
||||
"conflict": {
|
||||
"psr/log": ">=3",
|
||||
"symfony/dependency-injection": "<4.4",
|
||||
"symfony/dotenv": "<5.1",
|
||||
"symfony/event-dispatcher": "<4.4",
|
||||
|
@ -5666,7 +5665,7 @@
|
|||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.10"
|
||||
"source": "https://github.com/symfony/console/tree/v5.3.11"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -5682,7 +5681,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-10-26T09:30:15+00:00"
|
||||
"time": "2021-11-21T19:41:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-grapheme",
|
||||
|
@ -6010,21 +6009,25 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v2.4.0",
|
||||
"version": "v2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/service-contracts.git",
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
||||
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
|
||||
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "^1.1"
|
||||
"psr/container": "^1.1",
|
||||
"symfony/deprecation-contracts": "^2.1"
|
||||
},
|
||||
"conflict": {
|
||||
"ext-psr": "<1.1|>=2"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/service-implementation": ""
|
||||
|
@ -6032,7 +6035,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.4-dev"
|
||||
"dev-main": "2.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
|
@ -6069,7 +6072,7 @@
|
|||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
|
||||
"source": "https://github.com/symfony/service-contracts/tree/v2.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -6085,7 +6088,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-04-01T10:43:52+00:00"
|
||||
"time": "2021-11-04T16:48:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/string",
|
||||
|
|
|
@ -595,11 +595,27 @@ trait DatabaseBase
|
|||
'attributes' => ['title'],
|
||||
]);
|
||||
|
||||
$this->assertEquals($titleIndex['headers']['status-code'], 201);
|
||||
$this->assertEquals($titleIndex['body']['key'], 'titleIndex');
|
||||
$this->assertEquals($titleIndex['body']['type'], 'fulltext');
|
||||
$this->assertEquals(201, $titleIndex['headers']['status-code']);
|
||||
$this->assertEquals('titleIndex', $titleIndex['body']['key']);
|
||||
$this->assertEquals('fulltext', $titleIndex['body']['type']);
|
||||
$this->assertCount(1, $titleIndex['body']['attributes']);
|
||||
$this->assertEquals($titleIndex['body']['attributes'][0], 'title');
|
||||
$this->assertEquals('title', $titleIndex['body']['attributes'][0]);
|
||||
|
||||
$releaseYearIndex = $this->client->call(Client::METHOD_POST, '/database/collections/' . $data['moviesId'] . '/indexes', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||
]), [
|
||||
'indexId' => 'releaseYear',
|
||||
'type' => 'key',
|
||||
'attributes' => ['releaseYear'],
|
||||
]);
|
||||
|
||||
$this->assertEquals(201, $releaseYearIndex['headers']['status-code']);
|
||||
$this->assertEquals('releaseYear', $releaseYearIndex['body']['key']);
|
||||
$this->assertEquals('key', $releaseYearIndex['body']['type']);
|
||||
$this->assertCount(1, $releaseYearIndex['body']['attributes']);
|
||||
$this->assertEquals('releaseYear', $releaseYearIndex['body']['attributes'][0]);
|
||||
|
||||
// wait for database worker to create index
|
||||
sleep(2);
|
||||
|
@ -611,8 +627,11 @@ trait DatabaseBase
|
|||
]), []);
|
||||
|
||||
$this->assertIsArray($movies['body']['indexes']);
|
||||
$this->assertCount(1, $movies['body']['indexes']);
|
||||
$this->assertEquals($movies['body']['indexes'][0]['key'], $titleIndex['body']['key']);
|
||||
$this->assertCount(2, $movies['body']['indexes']);
|
||||
$this->assertEquals($titleIndex['body']['key'], $movies['body']['indexes'][0]['key']);
|
||||
$this->assertEquals($releaseYearIndex['body']['key'], $movies['body']['indexes'][1]['key']);
|
||||
$this->assertEquals('available', $movies['body']['indexes'][0]['status']);
|
||||
$this->assertEquals('available', $movies['body']['indexes'][1]['status']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@ -1024,93 +1043,77 @@ trait DatabaseBase
|
|||
/**
|
||||
* @depends testCreateDocument
|
||||
*/
|
||||
// public function testDocumentsListSuccessSearch(array $data):array
|
||||
// {
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'queries' => ['title.search("Captain America")'],
|
||||
// ]);
|
||||
public function testDocumentsListQueries(array $data):array
|
||||
{
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['title.search("Captain America")'],
|
||||
]);
|
||||
|
||||
// var_dump($documents);
|
||||
$this->assertEquals($documents['headers']['status-code'], 200);
|
||||
$this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']);
|
||||
$this->assertCount(1, $documents['body']['documents']);
|
||||
|
||||
// $this->assertEquals($documents['headers']['status-code'], 200);
|
||||
// $this->assertEquals(1944, $documents['body']['documents'][0]['releaseYear']);
|
||||
// $this->assertCount(1, $documents['body']['documents']);
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['title.search("Homecoming")'],
|
||||
]);
|
||||
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'queries' => ['title.search("Homecoming")'],
|
||||
// ]);
|
||||
$this->assertEquals($documents['headers']['status-code'], 200);
|
||||
$this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']);
|
||||
$this->assertCount(1, $documents['body']['documents']);
|
||||
|
||||
// $this->assertEquals($documents['headers']['status-code'], 200);
|
||||
// $this->assertEquals(2017, $documents['body']['documents'][0]['releaseYear']);
|
||||
// $this->assertCount(1, $documents['body']['documents']);
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['title.search("spider")'],
|
||||
]);
|
||||
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'queries' => ['title.search("spider")'],
|
||||
// ]);
|
||||
$this->assertEquals($documents['headers']['status-code'], 200);
|
||||
$this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']);
|
||||
$this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']);
|
||||
$this->assertCount(2, $documents['body']['documents']);
|
||||
|
||||
// $this->assertEquals($documents['headers']['status-code'], 200);
|
||||
// $this->assertEquals(2019, $documents['body']['documents'][0]['releaseYear']);
|
||||
// $this->assertEquals(2017, $documents['body']['documents'][1]['releaseYear']);
|
||||
// $this->assertCount(2, $documents['body']['documents']);
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['releaseYear.equal(1944)'],
|
||||
]);
|
||||
|
||||
// return [];
|
||||
// }
|
||||
// TODO@kodumbeats test for empty searches and misformatted queries
|
||||
$this->assertCount(1, $documents['body']['documents']);
|
||||
$this->assertEquals('Captain America', $documents['body']['documents'][0]['title']);
|
||||
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['releaseYear.notEqual(1944)'],
|
||||
]);
|
||||
|
||||
$this->assertCount(2, $documents['body']['documents']);
|
||||
$this->assertEquals('Spider-Man: Far From Home', $documents['body']['documents'][0]['title']);
|
||||
$this->assertEquals('Spider-Man: Homecoming', $documents['body']['documents'][1]['title']);
|
||||
|
||||
/**
|
||||
* @depends testCreateDocument
|
||||
* Test for Failure
|
||||
*/
|
||||
// public function testListDocumentsFilters(array $data):array
|
||||
// {
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'filters' => [
|
||||
// 'actors.firstName=Tom'
|
||||
// ],
|
||||
// ]);
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['actors.equal("Tom Holland")'],
|
||||
]);
|
||||
$this->assertEquals(400, $documents['headers']['status-code']);
|
||||
$this->assertEquals('Index not found: actors', $documents['body']['message']);
|
||||
|
||||
// $this->assertCount(2, $documents['body']['documents']);
|
||||
// $this->assertEquals('Spider-Man: Far From Home', $documents['body']['documents'][0]['name']);
|
||||
// $this->assertEquals('Spider-Man: Homecoming', $documents['body']['documents'][1]['name']);
|
||||
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'filters' => [
|
||||
// 'releaseYear=1944'
|
||||
// ],
|
||||
// ]);
|
||||
|
||||
// $this->assertCount(1, $documents['body']['documents']);
|
||||
// $this->assertEquals('Captain America', $documents['body']['documents'][0]['name']);
|
||||
|
||||
// $documents = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/documents', array_merge([
|
||||
// 'content-type' => 'application/json',
|
||||
// 'x-appwrite-project' => $this->getProject()['$id'],
|
||||
// ], $this->getHeaders()), [
|
||||
// 'filters' => [
|
||||
// 'releaseYear!=1944'
|
||||
// ],
|
||||
// ]);
|
||||
|
||||
// $this->assertCount(2, $documents['body']['documents']);
|
||||
// $this->assertEquals('Spider-Man: Far From Home', $documents['body']['documents'][0]['name']);
|
||||
// $this->assertEquals('Spider-Man: Homecoming', $documents['body']['documents'][1]['name']);
|
||||
|
||||
// return [];
|
||||
// }
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @depends testCreateDocument
|
||||
|
|
|
@ -73,8 +73,8 @@ trait TeamsBaseClient
|
|||
$this->assertEquals('Invitation to '.$teamName.' Team at '.$this->getProject()['name'], $lastEmail['subject']);
|
||||
|
||||
$secret = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256);
|
||||
$membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 13);
|
||||
$userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 13);
|
||||
$membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 20);
|
||||
$userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 20);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
|
|
@ -534,8 +534,8 @@ trait WebhooksBase
|
|||
$lastEmail = $this->getLastEmail();
|
||||
|
||||
$secret = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256);
|
||||
$membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 13);
|
||||
$userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 13);
|
||||
$membershipUid = substr($lastEmail['text'], strpos($lastEmail['text'], '?membershipId=', 0) + 14, 20);
|
||||
$userUid = substr($lastEmail['text'], strpos($lastEmail['text'], '&userId=', 0) + 8, 20);
|
||||
|
||||
$webhook = $this->getLastRequest();
|
||||
|
||||
|
|
Loading…
Reference in a new issue