当添加这样一个简单的函数时:
import * as admin from 'firebase-admin'
import * as functions from 'firebase-functions'
admin.initializeApp()
export const setOwner = functions.firestore.document('/groups/{id}').onCreate((document, context) => {
return document.ref.set({ owner: context.auth?.uid }, { merge: true })
})
我收到此错误:Failed to configure trigger event-type:providers/cloud.firestore/eventTypes/document.create resource:projects/<My-hidden-project>/databases/(default)/documents/groups/{id} service:firestore.googleapis.com
('/groups/{id}')
或('groups/{id}')
或('groups/doc')
没有帮助
1条答案
按热度按时间qojgxg4l1#
我没有做任何更改,但经过数百次尝试,部署成功了