Firebase:无法配置onCreate触发器

s1ag04yj  于 2023-01-18  发布在  其他
关注(0)|答案(1)|浏览(93)

当添加这样一个简单的函数时:

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')没有帮助

qojgxg4l

qojgxg4l1#

我没有做任何更改,但经过数百次尝试,部署成功了

相关问题