aboutsummaryrefslogtreecommitdiff
path: root/clientapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-05-22 12:28:48 +0100
committerGitHub <noreply@github.com>2020-05-22 12:28:48 +0100
commit3daa2327edc90e1ff70bcbc578b793ae5ba5b69f (patch)
tree93ddec9cacff504b8bc0e6e6aaf81167a6873d44 /clientapi
parentfbdcfdd25674eb73c4804be42031397e415797a9 (diff)
dendritejs tweaks for persisting sqlite DBs (#1058)
* Use uri.path so we don't have file: in the filename * New go-sqlite-js version
Diffstat (limited to 'clientapi')
-rw-r--r--clientapi/auth/storage/accounts/storage_wasm.go2
-rw-r--r--clientapi/auth/storage/devices/storage_wasm.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/auth/storage/accounts/storage_wasm.go b/clientapi/auth/storage/accounts/storage_wasm.go
index 81e77cf7..7cf50de7 100644
--- a/clientapi/auth/storage/accounts/storage_wasm.go
+++ b/clientapi/auth/storage/accounts/storage_wasm.go
@@ -36,7 +36,7 @@ func NewDatabase(
case "postgres":
return nil, fmt.Errorf("Cannot use postgres implementation")
case "file":
- return sqlite3.NewDatabase(dataSourceName, serverName)
+ return sqlite3.NewDatabase(uri.Path, serverName)
default:
return nil, fmt.Errorf("Cannot use postgres implementation")
}
diff --git a/clientapi/auth/storage/devices/storage_wasm.go b/clientapi/auth/storage/devices/storage_wasm.go
index 14c19e74..c89ad887 100644
--- a/clientapi/auth/storage/devices/storage_wasm.go
+++ b/clientapi/auth/storage/devices/storage_wasm.go
@@ -36,7 +36,7 @@ func NewDatabase(
case "postgres":
return nil, fmt.Errorf("Cannot use postgres implementation")
case "file":
- return sqlite3.NewDatabase(dataSourceName, serverName)
+ return sqlite3.NewDatabase(uri.Path, serverName)
default:
return nil, fmt.Errorf("Cannot use postgres implementation")
}