mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Check if value has then function when setting result to check external promise types
This commit is contained in:
@@ -69,7 +69,7 @@ class Schema
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function api(App $utopia): array
|
||||
protected static function api(App $utopia): array
|
||||
{
|
||||
Mapper::init($utopia
|
||||
->getResource('response')
|
||||
@@ -123,7 +123,7 @@ class Schema
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function collections(
|
||||
protected static function collections(
|
||||
App $utopia,
|
||||
Database $dbForProject
|
||||
): array {
|
||||
|
||||
@@ -132,7 +132,7 @@ abstract class Promise
|
||||
*/
|
||||
protected function setResult(mixed $value): void
|
||||
{
|
||||
if (!$value instanceof self) {
|
||||
if (!\is_callable([$value, 'then'])) {
|
||||
$this->result = $value;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user