1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

removing some duplication on collections.php

adding var hint for $user
This commit is contained in:
fogelito 2022-06-08 12:20:23 +03:00
parent 0905ee37d7
commit f2c545db64
2 changed files with 2 additions and 4 deletions

View file

@ -1748,7 +1748,6 @@ $collections = [
'signed' => true, 'signed' => true,
'required' => false, 'required' => false,
'default' => null, 'default' => null,
'array' => false,
'filters' => [], 'filters' => [],
], ],
[ [
@ -1920,7 +1919,6 @@ $collections = [
'signed' => true, 'signed' => true,
'required' => false, 'required' => false,
'default' => null, 'default' => null,
'array' => false,
'filters' => [], 'filters' => [],
], ],
[ [
@ -2211,7 +2209,6 @@ $collections = [
'signed' => true, 'signed' => true,
'required' => false, 'required' => false,
'default' => null, 'default' => null,
'array' => false,
'filters' => [], 'filters' => [],
], ],
[ [
@ -2670,7 +2667,6 @@ $collections = [
'signed' => true, 'signed' => true,
'required' => false, 'required' => false,
'default' => null, 'default' => null,
'array' => false,
'filters' => [], 'filters' => [],
], ],
[ [

View file

@ -741,6 +741,8 @@ App::put('/v1/account/sessions/magic-url')
->inject('events') ->inject('events')
->action(function (string $userId, string $secret, Request $request, Response $response, Database $dbForProject, Locale $locale, Reader $geodb, Audit $audits, Event $events) { ->action(function (string $userId, string $secret, Request $request, Response $response, Database $dbForProject, Locale $locale, Reader $geodb, Audit $audits, Event $events) {
/** @var Utopia\Database\Document $user */
$user = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId)); $user = Authorization::skip(fn() => $dbForProject->getDocument('users', $userId));
if ($user->isEmpty()) { if ($user->isEmpty()) {