Exposes the loggerAdapter as log to Cloud Functions and Triggers (#1565)
This allows access to logging inside cloud code and triggers via
request.log.info
request.log.error
This commit is contained in:
committed by
Florent Vilmart
parent
2d94a885d2
commit
6e9529f81c
@@ -162,7 +162,7 @@ RestWrite.prototype.runBeforeTrigger = function() {
|
||||
updatedObject.set(this.sanitizedData());
|
||||
|
||||
return Promise.resolve().then(() => {
|
||||
return triggers.maybeRunTrigger(triggers.Types.beforeSave, this.auth, updatedObject, originalObject, this.config.applicationId);
|
||||
return triggers.maybeRunTrigger(triggers.Types.beforeSave, this.auth, updatedObject, originalObject, this.config);
|
||||
}).then((response) => {
|
||||
if (response && response.object) {
|
||||
this.data = response.object;
|
||||
@@ -824,7 +824,7 @@ RestWrite.prototype.runAfterTrigger = function() {
|
||||
this.config.liveQueryController.onAfterSave(updatedObject.className, updatedObject, originalObject);
|
||||
|
||||
// Run afterSave trigger
|
||||
triggers.maybeRunTrigger(triggers.Types.afterSave, this.auth, updatedObject, originalObject, this.config.applicationId);
|
||||
triggers.maybeRunTrigger(triggers.Types.afterSave, this.auth, updatedObject, originalObject, this.config);
|
||||
};
|
||||
|
||||
// A helper to figure out what location this operation happens at.
|
||||
|
||||
Reference in New Issue
Block a user