mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
feat(server): add user existence check and optimize permission queries (#10402)
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user