Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: minor fixes to monographs

Abdullah Attaf67f4138c342
diff --git a/packages/core/src/api/monographs.ts b/packages/core/src/api/monographs.ts
index 1d254b2c2..f0f30dd21 100644
--- a/packages/core/src/api/monographs.ts
+++ b/packages/core/src/api/monographs.ts
@@ -127,7 +127,6 @@ export class Monographs {
const method = update ? http.patch.json : http.post.json;
const deviceId = await this.db.kv().read("deviceId");
- console.log("PUBLISHING", monograph);
const { id, datePublished } = await method(
`${Constants.API_HOST}/monographs?deviceId=${deviceId}`,
monograph,
diff --git a/packages/core/src/collections/monographs.ts b/packages/core/src/collections/monographs.ts
index c2f966111..c9d0fd439 100644
--- a/packages/core/src/collections/monographs.ts
+++ b/packages/core/src/collections/monographs.ts
@@ -18,12 +18,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import Database from "../api/index.js";
-import { ItemReference, Monograph, Vault } from "../types.js";
+import { Monograph } from "../types.js";
import { ICollection } from "./collection.js";
import { SQLCollection } from "../database/sql-collection.js";
import { getId } from "../utils/id.js";
import { isFalse } from "../database/index.js";
-import { sql } from "@streetwriters/kysely";
export class Monographs implements ICollection {
name = "monographs";
@@ -57,7 +56,7 @@ export class Monographs implements ICollection {
...monograph
};
- this.collection.upsert({
+ await this.collection.upsert({
id,
title: merged.title,
datePublished: merged.datePublished,