Fix bad initial JSON in server/storage/accounts.ts
Change-Id: I6ac54e716b9d3df31c23926b6c9c6a9d063f37cf
diff --git a/server/src/routers/auth-router.ts b/server/src/routers/auth-router.ts
index 01e0ad1..6f71ac6 100644
--- a/server/src/routers/auth-router.ts
+++ b/server/src/routers/auth-router.ts
@@ -59,7 +59,10 @@
const hashedPassword = await argon2.hash(password, { type: argon2.argon2id });
- const accountDetails: Partial<AccountDetails> = { 'Account.archivePassword': password };
+ const accountDetails: Partial<AccountDetails> = {
+ // TODO: enable encrypted archives
+ // 'Account.archivePassword': password
+ };
if (isJams) {
accountDetails['Account.managerUri'] = 'https://jams.savoirfairelinux.com/';
accountDetails['Account.managerUsername'] = username;
diff --git a/server/src/storage/accounts.ts b/server/src/storage/accounts.ts
index efcd014..1d3df05 100644
--- a/server/src/storage/accounts.ts
+++ b/server/src/storage/accounts.ts
@@ -36,7 +36,7 @@
try {
buffer = readFileSync(this.filename);
} catch (e) {
- buffer = Buffer.from('{"local":{}},"jams":{}}}');
+ buffer = Buffer.from('{"local":{},"jams":{}}');
}
this.accounts = JSON.parse(buffer.toString());