rez_core 2.2.174 → 2.2.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "2.2.174",
3
+ "version": "2.2.176",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -30,10 +30,10 @@ export class UserController {
30
30
  @Post('check-email')
31
31
  @HttpCode(HttpStatus.OK)
32
32
  async checkEmail(@Body() body, @Res() res: Response) {
33
- const { email, subdomain } = body;
33
+ const { email_id, subdomain } = body;
34
34
  console.log(body, 'body');
35
35
  const result = await this.userService.checkEmailExists({
36
- email,
36
+ email_id,
37
37
  subdomain,
38
38
  });
39
39
  return res.status(HttpStatus.OK).json(result);
@@ -302,14 +302,12 @@ export class UserService extends EntityServiceImpl {
302
302
  }
303
303
 
304
304
  async checkEmailExists(data: {
305
- email: string;
305
+ email_id: string;
306
306
  subdomain: string;
307
307
  }): Promise<any> {
308
- const { email, subdomain } = data;
308
+ const { email_id, subdomain } = data;
309
309
 
310
- console.log('Email and Subdomain', email, subdomain);
311
-
312
- if (!email || !subdomain) {
310
+ if (!email_id || !subdomain) {
313
311
  return { success: false, message: 'Email and Subdomain is required' };
314
312
  }
315
313
 
@@ -326,10 +324,8 @@ export class UserService extends EntityServiceImpl {
326
324
  }
327
325
  }
328
326
 
329
- console.log('Email and Subdomain 2nd', email, subdomain);
330
-
331
327
  // 🔹 Step 2: Find the user by email + organization check
332
- const user = await this.userRepository.findByEmailId(email);
328
+ const user = await this.userRepository.findByEmailId(email_id);
333
329
 
334
330
  if (!user || (organization && user.organization_id !== organization.id)) {
335
331
  throw new BadRequestException('User not found in organization.');