π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
qp
Manav Rathiab052dcb8903
diff --git a/web/packages/base/origins.ts b/web/packages/base/origins.tsindex 17466dfece..597eb5b908 100644--- a/web/packages/base/origins.ts+++ b/web/packages/base/origins.ts@@ -21,14 +21,16 @@ export const apiOrigin = async () =>** @param queryParams An optional object containing query params. This is* appended to the generated URL after funneling it through- * {@link URLSearchParams}. The values can be `strings` or `numbers` (both of- * which are converted to `string`s by using `toString`).+ * {@link URLSearchParams}. Each value can be a `string` or `number` or+ * `boolean` - all of which are converted to `string`s by using `toString`+ *+ * > The boolean stringification yields "true" or "false".** @returns path prefixed by {@link apiOrigin}.*/export const apiURL = async (path: string,- queryParams?: Record<string, string | number>,+ queryParams?: Record<string, string | number | boolean>,) => {let url = (await apiOrigin()) + path;if (queryParams) {diff --git a/web/packages/new/photos/services/collection.ts b/web/packages/new/photos/services/collection.tsindex d655bcae5f..6eeb0b1b5a 100644--- a/web/packages/new/photos/services/collection.ts+++ b/web/packages/new/photos/services/collection.ts@@ -930,11 +930,13 @@ export const deleteCollection = async (}ensureOk(- await fetch(await apiURL(`/collections/v3/${collectionID}`), {- method: "DELETE",- headers: await authenticatedRequestHeaders(),- body: JSON.stringify({ collectionID, keepFiles }),- }),+ await fetch(+ await apiURL(`/collections/v3/${collectionID}`, {+ collectionID,+ keepFiles,+ }),+ { method: "DELETE", headers: await authenticatedRequestHeaders() },+ ),);};