Skip to content

Build your personal knowledge base with Trilium Notes

fix setup on non-root paths #404

zadama16aaf7a8179
diff --git a/package-lock.json b/package-lock.json
index 00e79a4a21..eca7487efc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "trilium",
- "version": "0.37.2",
+ "version": "0.37.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/src/public/javascripts/setup.js b/src/public/javascripts/setup.js
index 45a633dc4d..e7cf7c7e12 100644
--- a/src/public/javascripts/setup.js
+++ b/src/public/javascripts/setup.js
@@ -76,12 +76,12 @@ function SetupModel() {
}
// not using server.js because it loads too many dependencies
- $.post('/api/setup/new-document', {
+ $.post('api/setup/new-document', {
username: username,
password: password1,
theme: theme
}).then(() => {
- window.location.replace("/");
+ window.location.replace("./");
});
}
else if (this.setupType() === 'sync-from-server') {
@@ -128,10 +128,10 @@ function SetupModel() {
}
async function checkOutstandingSyncs() {
- const { stats, initialized } = await $.get('/api/sync/stats');
+ const { stats, initialized } = await $.get('api/sync/stats');
if (initialized) {
- window.location.replace("/");
+ window.location.replace("./");
}
const totalOutstandingSyncs = stats.outstandingPushes + stats.outstandingPulls;
diff --git a/src/views/setup.ejs b/src/views/setup.ejs
index 709bf618d6..0a24542903 100644
--- a/src/views/setup.ejs
+++ b/src/views/setup.ejs
@@ -138,7 +138,6 @@
</div>
<script type="text/javascript">
- const baseApiUrl = 'api/';
const glob = {
sourceId: ''
};