@actual-app/sync-server 26.1.0-nightly.20251229 → 26.1.0-nightly.20251230
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,6 +10,9 @@ const ADMIN_ROLE = 'ADMIN';
|
|
|
10
10
|
const createUser = (userId, userName, role, owner = 0, enabled = 1) => {
|
|
11
11
|
getAccountDb().mutate('INSERT INTO users (id, user_name, display_name, enabled, owner, role) VALUES (?, ?, ?, ?, ?, ?)', [userId, userName, `${userName} display`, enabled, owner, role]);
|
|
12
12
|
};
|
|
13
|
+
const deleteUser = (userId) => {
|
|
14
|
+
getAccountDb().mutate('DELETE FROM users WHERE id = ?', [userId]);
|
|
15
|
+
};
|
|
13
16
|
describe('/user-get-key', () => {
|
|
14
17
|
it('returns 401 if the user is not authenticated', async () => {
|
|
15
18
|
const res = await request(app).post('/user-get-key');
|
|
@@ -402,6 +405,7 @@ describe('/list-user-files', () => {
|
|
|
402
405
|
});
|
|
403
406
|
it('returns a list of user files for an authenticated user', async () => {
|
|
404
407
|
createUser('fileListAdminId', 'admin', ADMIN_ROLE, 1);
|
|
408
|
+
onTestFinished(() => deleteUser('fileListAdminId'));
|
|
405
409
|
const fileId1 = crypto.randomBytes(16).toString('hex');
|
|
406
410
|
const fileId2 = crypto.randomBytes(16).toString('hex');
|
|
407
411
|
const fileName1 = 'file1.txt';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/sync-server",
|
|
3
|
-
"version": "26.1.0-nightly.
|
|
3
|
+
"version": "26.1.0-nightly.20251230",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "actual syncing server",
|
|
6
6
|
"bin": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@actual-app/crdt": "2.1.0",
|
|
32
|
-
"@actual-app/web": "26.1.0-nightly.
|
|
32
|
+
"@actual-app/web": "26.1.0-nightly.20251230",
|
|
33
33
|
"bcrypt": "^6.0.0",
|
|
34
34
|
"better-sqlite3": "^12.4.1",
|
|
35
35
|
"convict": "^6.2.4",
|