rez_core 2.2.173 → 2.2.175
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/dist/module/user/controller/user.controller.js +3 -2
- package/dist/module/user/controller/user.controller.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +1 -1
- package/dist/module/user/service/user.service.js +5 -5
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/user/controller/user.controller.ts +3 -2
- package/src/module/user/service/user.service.ts +6 -6
package/package.json
CHANGED
|
@@ -30,9 +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 {
|
|
33
|
+
const { email_id, subdomain } = body;
|
|
34
|
+
console.log(body, 'body');
|
|
34
35
|
const result = await this.userService.checkEmailExists({
|
|
35
|
-
|
|
36
|
+
email_id,
|
|
36
37
|
subdomain,
|
|
37
38
|
});
|
|
38
39
|
return res.status(HttpStatus.OK).json(result);
|
|
@@ -302,14 +302,14 @@ export class UserService extends EntityServiceImpl {
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
async checkEmailExists(data: {
|
|
305
|
-
|
|
305
|
+
email_id: string;
|
|
306
306
|
subdomain: string;
|
|
307
307
|
}): Promise<any> {
|
|
308
|
-
const {
|
|
308
|
+
const { email_id, subdomain } = data;
|
|
309
309
|
|
|
310
|
-
console.log('Email and Subdomain',
|
|
310
|
+
console.log('Email and Subdomain', email_id, subdomain);
|
|
311
311
|
|
|
312
|
-
if (!
|
|
312
|
+
if (!email_id || !subdomain) {
|
|
313
313
|
return { success: false, message: 'Email and Subdomain is required' };
|
|
314
314
|
}
|
|
315
315
|
|
|
@@ -326,10 +326,10 @@ export class UserService extends EntityServiceImpl {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
console.log('Email and Subdomain 2nd',
|
|
329
|
+
console.log('Email and Subdomain 2nd', email_id, subdomain);
|
|
330
330
|
|
|
331
331
|
// 🔹 Step 2: Find the user by email + organization check
|
|
332
|
-
const user = await this.userRepository.findByEmailId(
|
|
332
|
+
const user = await this.userRepository.findByEmailId(email_id);
|
|
333
333
|
|
|
334
334
|
if (!user || (organization && user.organization_id !== organization.id)) {
|
|
335
335
|
throw new BadRequestException('User not found in organization.');
|