mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 20:49:45 +09:00
feat: sync AuthUserV1 (#21565)
* feat: sync AuthUserV1 * migration * chore: fix analyze * fix user updatedAt check * fix: auth user sync query * generate sql * bump schema version and update migration --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jason@rasm.me> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -84,4 +84,23 @@ describe(SyncEntityType.AuthUserV1, () => {
|
||||
expect.objectContaining({ type: SyncEntityType.SyncCompleteV1 }),
|
||||
]);
|
||||
});
|
||||
|
||||
it('should only sync the auth user', async () => {
|
||||
const { auth, user, ctx } = await setup(await getKyselyDB());
|
||||
|
||||
await ctx.newUser();
|
||||
|
||||
const response = await ctx.syncStream(auth, [SyncRequestType.AuthUsersV1]);
|
||||
expect(response).toEqual([
|
||||
{
|
||||
ack: expect.any(String),
|
||||
data: expect.objectContaining({
|
||||
id: user.id,
|
||||
isAdmin: false,
|
||||
}),
|
||||
type: 'AuthUserV1',
|
||||
},
|
||||
expect.objectContaining({ type: SyncEntityType.SyncCompleteV1 }),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user