我需要添加一个OR条件来代替“ Female”,即单个值。喜欢应该是“女” || “女”。基本上,我想使它不区分大小写,以便无论是小写还是大写字母,此条件都与这两个值匹配。
'use strict';
const functions = require('firebase-functions');
const admin = require('firebase-admin');
export const createPack = functions.https.onCall((data) => {
admin.initializeApp(functions.config().firebase);
console.log("[CREATE PACK] START");
const db = admin.firestore();
var document = db.collection("packs").doc();
console.log("[CREATE PACK] GOT REF");
document.set({
title: data.title,
date: data.date,
total: data.total,
activated: 0
});
let packId = document.id;
console.log('[CREATE PACK] PACK ID ' + packId);
console.log('[CREATE PACK] END');
return {
"id": packId
};