in my cloud function I have next unction:
export const collectionOnUpdate = functions.firestore.document('cards/{id}').onUpdate(async (change, context) => {
await updateDocumentInAlgolia(change);
});
And this function is triggered each time, when any fields of document was edited. But I want to run it only when one of specific fields was changed (in this case, for example: title
, category
) and not when any of other.
How can I do this?