Fixed: when a document is created or updated, emits the correct "POST" or "PUT" event.