beforeSave
, afterSave
, beforeDelete
, afterDelete
, and cloud functions.{ "foo": "bar" }
.error
or success
set.success
: Send back any data your client will expect; or simply true
if your client doesnโt require any data.error
: The value provided should be the error message you want to return.{ "className": "TestObject", "foo": "bar" }
.beforeSave
request, send a JSON object with the key error
or success
set.beforeSave
triggers. By returning an error, you will cancel the save request and the object will not be stored in Moralis. You can also return a JSON object in the following format to override the values that will be saved for the object:beforeSave
triggers but weโll repeat them here for clarity.{ "className": "TestObject", "foo": "bar" }
.afterSave
triggers.beforeDelete
triggers. The parameters sent to your webhook are the same as for beforeSave
and afterSave
triggers but weโll repeat them here for clarity.{ "className": "TestObject", "foo": "bar" }
.beforeDelete
request, send a JSON object with the key error
or success
set. Returning an error will cancel the delete and the object will remain in your database.afterDelete
trigger is also accessible via webhooks. The parameters sent to your webhook are the same as for other triggers but weโll repeat them here for clarity.{ "className": "TestObject", "foo": "bar" }
.afterDelete
triggers.