当以下触发器上传到azure文档集时,我得到未定义的TriggerType:
'mytriggerTrigger': {
id: 'triggerid',
serverScript: function Foo() {
// code omitted
},
triggerType: TriggerType.Pre,
triggerOperation : TriggerOperation.Create
}
答案 0 :(得分:0)
您需要导入DocumentBase
对象,然后才能访问这些属性。
var documentdb = require('documentdb'),
DocumentClient = documentdb.DocumentClient,
DocumentBase = documentdb.DocumentBase;
'mytriggerTrigger': {
id: 'triggerid',
serverScript: function Foo() {
// code omitted
},
triggerType: DocumentBase.TriggerType.Pre,
triggerOperation : DocumentBase.TriggerOperation.Create
}