File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change 41
41
"queryScope" : " COLLECTION" ,
42
42
"fields" : [
43
43
{
44
- "fieldPath" : " visibility " ,
44
+ "fieldPath" : " uid " ,
45
45
"order" : " ASCENDING"
46
46
},
47
47
{
59
59
"order" : " ASCENDING"
60
60
},
61
61
{
62
- "fieldPath" : " uid " ,
63
- "order" : " ASCENDING "
62
+ "fieldPath" : " likes " ,
63
+ "order" : " DESCENDING "
64
64
}
65
65
]
66
66
},
75
75
{
76
76
"fieldPath" : " uid" ,
77
77
"order" : " ASCENDING"
78
- },
79
- {
80
- "fieldPath" : " likes" ,
81
- "order" : " DESCENDING"
82
78
}
83
79
]
84
80
},
85
81
{
86
82
"collectionGroup" : " sets" ,
87
83
"queryScope" : " COLLECTION" ,
88
84
"fields" : [
85
+ {
86
+ "fieldPath" : " visibility" ,
87
+ "order" : " ASCENDING"
88
+ },
89
89
{
90
90
"fieldPath" : " uid" ,
91
91
"order" : " ASCENDING"
92
92
},
93
93
{
94
- "fieldPath" : " creationTime " ,
94
+ "fieldPath" : " likes " ,
95
95
"order" : " DESCENDING"
96
96
}
97
97
]
129
129
"ttl" : false ,
130
130
"indexes" : []
131
131
},
132
- {
133
- "collectionGroup" : " sets" ,
134
- "fieldPath" : " name" ,
135
- "ttl" : false ,
136
- "indexes" : []
137
- },
138
132
{
139
133
"collectionGroup" : " sets" ,
140
134
"fieldPath" : " description" ,
Original file line number Diff line number Diff line change @@ -66,9 +66,9 @@ export const Firestore = {
66
66
headers : getRequestHeaders ( idToken ) ,
67
67
body : JSON . stringify ( { structuredQuery } )
68
68
} ) ;
69
- const json : { document : FirestoreRestDocument , done : boolean , } [ ] & FirestoreRestError = await res . json ( ) ;
70
- if ( "error" in json && json . error ) throwResponseError ( json . error ) ;
71
- if ( json . length === 1 && json [ 0 ] . done && ! json [ 0 ] . document ) return [ ] ;
69
+ const json : ( { document : FirestoreRestDocument , done : boolean } & FirestoreRestError ) [ ] = await res . json ( ) ;
70
+ if ( "error" in json [ 0 ] && json [ 0 ] . error ) throwResponseError ( json [ 0 ] . error ) ;
71
+ if ( json . length === 1 && ! json [ 0 ] . document ) return [ ] ;
72
72
return json . map ( ( info ) => {
73
73
const docObj : ParsedRestDocument = {
74
74
pathParts : info . document . name . split ( "/" ) ,
You can’t perform that action at this time.
0 commit comments