diff --git a/docs/logo/postman-icon.png b/docs/logo/postman-icon.png new file mode 100644 index 000000000..53297a874 Binary files /dev/null and b/docs/logo/postman-icon.png differ diff --git a/packages/api/scripts/seed.sql b/packages/api/scripts/seed.sql index 0f4451e45..6bd5a3ec2 100644 --- a/packages/api/scripts/seed.sql +++ b/packages/api/scripts/seed.sql @@ -7,6 +7,6 @@ INSERT INTO connector_sets (id_connector_set, crm_hubspot, crm_zoho, crm_pipedri ('aed0f856-f802-4a79-8640-66d441581a99', TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE); INSERT INTO projects (id_project, name, sync_mode, id_user, id_connector_set) VALUES - ('1e468c15-aa57-4448-aa2b-7fed640d1e3d', 'Project 1', 'pool', '0ce39030-2901-4c56-8db0-5e326182ec6b', '1709da40-17f7-4d3a-93a0-96dc5da6ddd7'), - ('4c641a21-a7f8-4ffe-b7e8-e7d32db87557', 'Project 2', 'pool', '0ce39030-2901-4c56-8db0-5e326182ec6b', '852dfff8-ab63-4530-ae49-e4b2924407f8'), - ('2b198012-c79c-4bb6-971e-9635830e8c15', 'Project 3', 'pool', '0ce39030-2901-4c56-8db0-5e326182ec6b', 'aed0f856-f802-4a79-8640-66d441581a99'); + ('1e468c15-aa57-4448-aa2b-7fed640d1e3d', 'Project 1', 'pull', '0ce39030-2901-4c56-8db0-5e326182ec6b', '1709da40-17f7-4d3a-93a0-96dc5da6ddd7'), + ('4c641a21-a7f8-4ffe-b7e8-e7d32db87557', 'Project 2', 'pull', '0ce39030-2901-4c56-8db0-5e326182ec6b', '852dfff8-ab63-4530-ae49-e4b2924407f8'), + ('2b198012-c79c-4bb6-971e-9635830e8c15', 'Project 3', 'pull', '0ce39030-2901-4c56-8db0-5e326182ec6b', 'aed0f856-f802-4a79-8640-66d441581a99'); diff --git a/packages/api/src/@core/auth/auth.service.ts b/packages/api/src/@core/auth/auth.service.ts index 8c7722446..ebd9461b5 100644 --- a/packages/api/src/@core/auth/auth.service.ts +++ b/packages/api/src/@core/auth/auth.service.ts @@ -10,6 +10,7 @@ import { PrismaService } from '../@core-services/prisma/prisma.service'; import { CreateUserDto } from './dto/create-user.dto'; import { LoginDto } from './dto/login.dto'; import { VerifyUserDto } from './dto/verify-user.dto'; +import { ConflictException } from '@nestjs/common'; @Injectable() export class AuthService { @@ -67,12 +68,8 @@ export class AuthService { }); if (foundUser) { - new AuthError({ - name: 'EMAIL_ALREADY_EXISTS_ERROR', - message: `Email already exists for user with email=${user.email}`, - }); + throw new ConflictException(`Email already exists. Try resetting your password.`); } - return await this.createUser(user); } catch (error) { throw error; @@ -95,7 +92,7 @@ export class AuthService { }, }); await this.projectService.createProject({ - name: 'Project 1', + name: 'My Project', id_user: user_.id_user, }); return user_; @@ -327,4 +324,4 @@ export class AuthService { throw error; } } -} +} \ No newline at end of file diff --git a/packages/api/src/@core/projects/projects.service.ts b/packages/api/src/@core/projects/projects.service.ts index ebcac8513..eb1d53961 100644 --- a/packages/api/src/@core/projects/projects.service.ts +++ b/packages/api/src/@core/projects/projects.service.ts @@ -66,7 +66,7 @@ export class ProjectsService { const res = await this.prisma.projects.create({ data: { name: data.name, - sync_mode: 'pool', + sync_mode: 'pull', id_project: uuidv4(), id_user: data.id_user, id_connector_set: cSet.id_connector_set,