Skip to content

🐛 Bug Report: Double-Nested Data in User Preferences account.updatePrefs #221

Open
@olerhan

Description

@olerhan

👟 Reproduction steps

Running the following code in a Flutter project:

prefs = {"data": {"name" : "Erhan"}};
User prefsUpdatedUser = await account.updatePrefs(
  prefs: prefs,
);

Running the code to update user preferences.

👍 Expected behavior

The user preferences should be:
prefsUpdatedUser.prefs => {"data": {"name" : "Erhan"}}

👎 Actual Behavior

Instead, the actual preferences returned are:
prefsUpdatedUser.prefs => {"data": {"data": {"name" : "Erhan"}}}

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

MacOS

🧱 Your Environment

I'm working on a Flutter project using Visual Studio Code with appwrite: ^13.0.0.
The issue can be easily resolved by sending the correct format of prefs. However, it creates confusion when working according to the references provided, which is why I believe this is a bug and wanted to report it:
https://appwrite.io/docs/references/cloud/models/user
https://appwrite.io/docs/references/1.6.x/models/preferences

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions