fix: optimize mindspace category counts

This commit is contained in:
john
2026-06-29 22:43:22 +08:00
parent 4fcb48395e
commit dff0308ccb
2 changed files with 24 additions and 16 deletions
+2 -2
View File
@@ -105,8 +105,8 @@ test('getSpace scopes space and categories to the authenticated user', async ()
assert.equal(space.quota.availableBytes, 5 * 1024 * 1024 - 3072);
assert.equal(space.categories[0].code, 'private');
assert.deepEqual(calls[0].params, ['user-1']);
assert.deepEqual(calls[1].params, ['user-1', 'space-1']);
assert.doesNotMatch(calls[1].sql, /source_type\s*=\s*'upload'/);
assert.deepEqual(calls[1].params, ['user-1', 'user-1', 'user-1', 'user-1', 'space-1']);
assert.match(calls[1].sql, /source_type\s*=\s*'upload'/);
});
test('getSpace includes schedule snapshot when schedule service is available', async () => {