[WIP] Whole FE migrated (#2517)
* Wip * WIP * Removed concole log * Add relations to workspace init (#2511) * Add relations to workspace init * remove logs * update prefill * add missing isSystem * comment relation fields * Migrate v2 core models to graphql schema (#2509) * migrate v2 core models to graphql schema * Migrate to new workspace member schema * Continue work * migrated-main * Finished accountOwner nested field integration on companies * Introduce bug * Fix --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com> Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -66,13 +66,6 @@ export class UserService {
|
||||
: await this.workspaceService.createDefaultWorkspace();
|
||||
|
||||
assert(workspace, 'workspace is missing', BadRequestException);
|
||||
|
||||
const userSettings = await this.prismaService.client.userSettings.create({
|
||||
data: { locale: 'en' },
|
||||
});
|
||||
|
||||
const settings = { connect: { id: userSettings.id } };
|
||||
|
||||
// Create user
|
||||
const user = await this.prismaService.client.user.upsert({
|
||||
where: {
|
||||
@ -80,17 +73,7 @@ export class UserService {
|
||||
},
|
||||
create: {
|
||||
...(args.data as Prisma.UserCreateInput),
|
||||
settings,
|
||||
|
||||
workspaceMember: {
|
||||
create: {
|
||||
workspace: {
|
||||
connect: { id: workspace.id },
|
||||
},
|
||||
settings,
|
||||
},
|
||||
},
|
||||
locale: 'en',
|
||||
defaultWorkspaceId: workspace.id,
|
||||
},
|
||||
update: {},
|
||||
...(args.select ? { select: args.select } : {}),
|
||||
|
||||
Reference in New Issue
Block a user