1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Model changes

This commit is contained in:
fogelito 2022-07-04 13:11:38 +03:00
parent 8628105eef
commit 903ca342cb
3 changed files with 2 additions and 8 deletions

View file

@ -1252,11 +1252,10 @@ App::get('/v1/account')
->inject('user') ->inject('user')
->inject('usage') ->inject('usage')
->action(function (Response $response, Document $user, Stats $usage) { ->action(function (Response $response, Document $user, Stats $usage) {
var_dump("********** 1 ");
$usage->setParam('users.read', 1); $usage->setParam('users.read', 1);
var_dump("********** 2 ");
$response->dynamic($user, Response::MODEL_USER); $response->dynamic($user, Response::MODEL_USER);
var_dump("********** 3 ");
}); });
App::get('/v1/account/prefs') App::get('/v1/account/prefs')

View file

@ -311,8 +311,6 @@ App::init(function (App $utopia, Request $request, Response $response, Document
} }
} }
var_dump($scope, $scopes);
if (!\in_array($scope, $scopes)) { if (!\in_array($scope, $scopes)) {
if ($project->isEmpty()) { // Check if permission is denied because project is missing if ($project->isEmpty()) { // Check if permission is denied because project is missing
throw new AppwriteException('Project not found', 404, AppwriteException::PROJECT_NOT_FOUND); throw new AppwriteException('Project not found', 404, AppwriteException::PROJECT_NOT_FOUND);

View file

@ -1356,9 +1356,6 @@ trait AccountBase
$sessionId = $response['body']['$id']; $sessionId = $response['body']['$id'];
$session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']]; $session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']];
var_dump($sessionId);
var_dump($session);
$response = $this->client->call(Client::METHOD_GET, '/account', array_merge([ $response = $this->client->call(Client::METHOD_GET, '/account', array_merge([
'origin' => 'http://localhost', 'origin' => 'http://localhost',
'content-type' => 'application/json', 'content-type' => 'application/json',