I am currently trying to use an appwrite function to update and overwrite the data stored in a database collection for users with but the function doesn't seem to be working or called. The data is stored as a string list. Is there something wrong with how i'm calling it?
TypeScript
// Updating user topics
Future<bool> updateUserTopics(String userId, List<String> topics) async {
try {
await databases.updateDocument(
databaseId: '6581a7a98574997f7e84',
collectionId: '6581a97c17588b1fb066',
documentId: userId,
data: {
'Topics': topics
},
);
print("Topics updated successfully.");
return true;
} catch (e) {
print("Error updating topics: $e");
return false;
}
}
TL;DR
The developer is having trouble updating and overwriting data stored in a database collection using an appwrite function. They are using a string list to store the data. They are unsure if there is an issue with how they are calling the function.Recommended threads
- Image transformations
On flutter web, when using image transformations, the results are being cached. When I replace an image, the old version still appears. Is it possible to manual...
- Router_path_not_found
Hi all, I have a website hosted on Appwrite sites, (repo on GitHub) and just earlier today the main page (and all pages) went down mysteriously with this error....
- HELP!
IT WOULDN'T BELEAVE I AM SIGNED IN