我使用的是 Node 10、firebase 8.0、firebase-admin 9.3.0。我已经包含了我的测试代码和客户端 js 版本的副本。
数据
Document ID | name | is_visible
----------- | ---- | ----------
1 | a | true
2 | b | true
3 | c | true
4 | d | true
5 | e | true
6 | f | true
7 | g | true
8 | h | true
9 | i | true
Run Code Online (Sandbox Code Playgroud)
代码
var admin = require("firebase-admin");
const firebaseConfig = {xxx}
admin.initializeApp({
credential: admin.credential.cert(firebaseConfig)
});
const getDocs = …Run Code Online (Sandbox Code Playgroud)