feat(server): add user existence check and optimize permission queries (#10402)

This commit is contained in:
fengmk2
2025-03-05 01:49:33 +00:00
parent b8ecfbdae6
commit 3d2c4fe007
4 changed files with 20 additions and 13 deletions
@@ -297,6 +297,14 @@ test('should paginate users', async t => {
);
});
test('should check if user exists', async t => {
const user = await t.context.user.create({
email: 'test@affine.pro',
});
t.true(await t.context.user.exists(user.id));
t.false(await t.context.user.exists('non-existing-user'));
});
// #region ConnectedAccount
test('should create, get, update, delete connected account', async t => {