Green: filter isDeleted tombstones out of listCollections
This commit is contained in:
@@ -155,17 +155,21 @@ export class Client {
|
|||||||
const { collections } = await this.api.getJSON<{
|
const { collections } = await this.api.getJSON<{
|
||||||
collections: RawCollection[];
|
collections: RawCollection[];
|
||||||
}>("/collections/v2", { sinceTime: 0 });
|
}>("/collections/v2", { sinceTime: 0 });
|
||||||
return collections.map((raw) =>
|
// The sync API keeps returning deleted collections as tombstones
|
||||||
decryptCollection(
|
// (isDeleted: true); their diff endpoint 404s, so drop them.
|
||||||
raw,
|
return collections
|
||||||
{
|
.filter((raw) => !raw.isDeleted)
|
||||||
masterKey: this.masterKey,
|
.map((raw) =>
|
||||||
publicKey: this.publicKey,
|
decryptCollection(
|
||||||
secretKey: this.secretKey,
|
raw,
|
||||||
},
|
{
|
||||||
this.userID,
|
masterKey: this.masterKey,
|
||||||
),
|
publicKey: this.publicKey,
|
||||||
);
|
secretKey: this.secretKey,
|
||||||
|
},
|
||||||
|
this.userID,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async listFiles(
|
async listFiles(
|
||||||
|
|||||||
Reference in New Issue
Block a user