mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): user endpoints (#9730)
* refactor(server): user endpoints * fix repos * fix unit tests --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
e7c8501930
commit
75830a4878
80 changed files with 2453 additions and 1914 deletions
|
|
@ -1,22 +1,11 @@
|
|||
import { faker } from '@faker-js/faker';
|
||||
import { UserAvatarColor, UserStatus, type UserResponseDto } from '@immich/sdk';
|
||||
import { UserAvatarColor, type UserResponseDto } from '@immich/sdk';
|
||||
import { Sync } from 'factory.ts';
|
||||
|
||||
export const userFactory = Sync.makeFactory<UserResponseDto>({
|
||||
id: Sync.each(() => faker.string.uuid()),
|
||||
email: Sync.each(() => faker.internet.email()),
|
||||
name: Sync.each(() => faker.person.fullName()),
|
||||
storageLabel: Sync.each(() => faker.string.alphanumeric()),
|
||||
profileImagePath: '',
|
||||
shouldChangePassword: Sync.each(() => faker.datatype.boolean()),
|
||||
isAdmin: true,
|
||||
createdAt: Sync.each(() => faker.date.past().toISOString()),
|
||||
deletedAt: null,
|
||||
updatedAt: Sync.each(() => faker.date.past().toISOString()),
|
||||
memoriesEnabled: true,
|
||||
oauthId: '',
|
||||
avatarColor: UserAvatarColor.Primary,
|
||||
quotaUsageInBytes: 0,
|
||||
quotaSizeInBytes: null,
|
||||
status: UserStatus.Active,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue