Skip to content

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

feat: get version

thecodrr6d9c5daa36a7
diff --git a/packages/core/api/index.js b/packages/core/api/index.js
index c34721b9c..d8ced69a8 100644
--- a/packages/core/api/index.js
+++ b/packages/core/api/index.js
@@ -16,6 +16,7 @@ import Settings from "./settings";
import Migrations from "./migrations";
import Outbox from "./outbox";
import UserManager from "./user-manager";
+import http from "../utils/http";
/**
* @type {EventSource}
@@ -170,6 +171,10 @@ class Database {
Constants.SSE_HOST = hosts.SSE_HOST || Constants.SSE_HOST;
}
}
+
+ version() {
+ return http.get(`${Constants.API_HOST}/version`);
+ }
}
export default Database;