Removed prefs merge behaviour
This commit is contained in:
parent
86593ea545
commit
a7a55821a1
|
@ -30,8 +30,8 @@
|
|||
## Breaking Changes (Read before upgrading!)
|
||||
- **Deprecated** `first` and `last` query params for documents list route in the database API
|
||||
- **Deprecated** Deprectaed Pubjabi Translations ('pn')
|
||||
- **Deprecated** `PATCH /account/prefs` in favour of `PUT /account/prefs` route
|
||||
- **Deprecated** `PATCH /users/:userId/prefs` in favour of `PUT /users/:userId/prefs` route
|
||||
- **Deprecated** `PATCH /account/prefs` is now updating the prefs payload and not just merging it
|
||||
- **Deprecated** `PATCH /users/:userId/prefs` is now updating the prefs payload and not just merging it
|
||||
- Switched order of limit and offset params in all the SDKs `listDocuments` method for better consistency
|
||||
- Default `limit` param value in all the SDKs `listDocuments` method is now 25 for better consistency
|
||||
|
||||
|
|
|
@ -829,7 +829,7 @@ App::patch('/v1/account/email')
|
|||
$response->dynamic($user, Response::MODEL_USER);
|
||||
}, ['response', 'user', 'projectDB', 'audits']);
|
||||
|
||||
App::put('/v1/account/prefs')
|
||||
App::patch('/v1/account/prefs')
|
||||
->desc('Update Account Preferences')
|
||||
->groups(['api', 'account'])
|
||||
->label('event', 'account.update.prefs')
|
||||
|
|
|
@ -13,6 +13,7 @@ use Utopia\Config\Config;
|
|||
use Appwrite\Auth\Auth;
|
||||
use Appwrite\Auth\Validator\Password;
|
||||
use Appwrite\Database\Database;
|
||||
use Appwrite\Database\Document;
|
||||
use Appwrite\Database\Exception\Duplicate;
|
||||
use Appwrite\Database\Validator\UID;
|
||||
use Appwrite\Utopia\Response;
|
||||
|
@ -97,20 +98,10 @@ App::get('/v1/users')
|
|||
],
|
||||
]);
|
||||
|
||||
$results = \array_map(function ($value) { /* @var $value \Database\Document */
|
||||
return $value->getArrayCopy(\array_merge(
|
||||
[
|
||||
'$id',
|
||||
'status',
|
||||
'email',
|
||||
'registration',
|
||||
'emailVerification',
|
||||
'name',
|
||||
],
|
||||
));
|
||||
}, $results);
|
||||
|
||||
$response->json(['sum' => $projectDB->getSum(), 'users' => $results]);
|
||||
$response->dynamic(new Document([
|
||||
'sum' => $projectDB->getSum(),
|
||||
'users' => $results
|
||||
]), Response::MODEL_FILE_LIST);
|
||||
}, ['response', 'projectDB']);
|
||||
|
||||
App::get('/v1/users/:userId')
|
||||
|
@ -341,7 +332,7 @@ App::patch('/v1/users/:userId/status')
|
|||
$response->dynamic($user, Response::MODEL_USER);
|
||||
}, ['response', 'projectDB']);
|
||||
|
||||
App::put('/v1/users/:userId/prefs')
|
||||
App::patch('/v1/users/:userId/prefs')
|
||||
->desc('Update User Preferences')
|
||||
->groups(['api', 'users'])
|
||||
->label('scope', 'users.write')
|
||||
|
|
Loading…
Reference in a new issue