Back

How to correctly call my Appwrite function when deleting an innocap in my app?

  • 1
  • Android
  • Functions
  • Flutter
  • Self Hosted
sidney
13 Jul, 2023, 13:06

'm working on connecting my backend with the frontend of my app, and I need to replace an existing function with my Appwrite function called deleteInnocap in the appwrite_client.dart file. I want this function to be triggered when I delete an innocap in my app. However, I'm encountering issues when calling the PHP function. Can someone guide me on how to correctly call the deleteInnocap PHP function in appwrite_client.dart so that it gets executed when I delete an innocap in my app?

TL;DR
To correctly call the deleteInnocap PHP function in the appwrite_client.dart file and ensure it gets executed when deleting an innocap in your app, you need to do the following: 1. In the backend of your app, locate the function deleteInnocap in the PHP file. 2. Ensure that the function is properly defined and functional. 3. In your appwrite_client.dart file, import the necessary dependencies and ensure you have the correct endpoint and API key configured. 4. When you want to delete an innocap in your app, call the deleteInnocap function by using the appropriate method in the Appwrite SDK
Drake
13 Jul, 2023, 16:29

If you want your function to trigger on document creation, you wouldn't be executing it from your client app. In your function settings, there's a section for events. There, you'd specify you want the function to trigger on document delete

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more