Code:
const { FireBoost } = require('fireboost');
const firestore = admin.firestore();
const admin = require('firebase-admin');
const certs = require('../certs.json');
admin.initializeApp({
credential: admin.credential.cert(certs),
databaseURL: 'https://blah.firebaseio.com',
});
function renameData() {
const fireBoost = new FireBoost().firestore();
const colRef = firestore.collection('Ventures');
const utilColRef = fireBoost.ref(colRef);
utilColRef.renameFieldDocs({ cover_image_url: 'coverImageUrl' });
}
renameData();
I'm trying to rename an attribute in all the documents in one of my collections. For some reason it keeps giving me a Something Went Wrong error. After checking the source code in this repo it seems like the error is because of this code here https://github.com/39ro/fireboost/blob/master/src/firestore.ts#L153. I double checked the type of colRef and verified that it is returning a CollectionReference. So I'm not sure why this is happening.
Any help here would be appreciated.
Code:
I'm trying to rename an attribute in all the documents in one of my collections. For some reason it keeps giving me a
Something Went Wrongerror. After checking the source code in this repo it seems like the error is because of this code here https://github.com/39ro/fireboost/blob/master/src/firestore.ts#L153. I double checked the type ofcolRefand verified that it is returning aCollectionReference. So I'm not sure why this is happening.Any help here would be appreciated.