Back

catch changed data on functions triggered by change

  • 0
  • Databases
  • Functions
kirusha
7 Nov, 2023, 11:57

hallo, im looking for a method to catch the data which was the key for a event.

i want to have a function. every time a data is c/u/d in a collection, i want to know which one and from who. so that i could have a method which create a notification with this information for example: user: "hgkuhgseg" updated the data "gesges" and so on.

TL;DR
You can use Events to trigger a function on a DB update. The `req.body` will contain an array with the updated data. If you want to capture the key data for an event, you can create a function that creates a notification with the information of the user and the updated data.
ideclon
7 Nov, 2023, 12:17

You can use Events ( reference ) to trigger a function on a DB update. The req.body will contain an array with the updated data

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