rez_core 2.2.177 → 2.2.181
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/communication/controller/communication.controller.js +2 -2
- package/dist/module/communication/controller/communication.controller.js.map +1 -1
- package/dist/module/communication/service/communication.service.js +1 -1
- package/dist/module/communication/service/communication.service.js.map +1 -1
- package/dist/module/user/controller/user.controller.js +2 -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 +3 -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/communication/controller/communication.controller.ts +2 -2
- package/src/module/communication/service/communication.service.ts +1 -1
- package/src/module/user/controller/user.controller.ts +2 -2
- package/src/module/user/service/user.service.ts +4 -8
- package/.vscode/extensions.json +0 -5
package/package.json
CHANGED
|
@@ -112,10 +112,10 @@ export class CommunicationController {
|
|
|
112
112
|
@HttpCode(HttpStatus.OK)
|
|
113
113
|
async activateConfig(
|
|
114
114
|
@Param('id', ParseIntPipe) hubId: number,
|
|
115
|
-
@
|
|
115
|
+
@Query('status') status: number,
|
|
116
116
|
) {
|
|
117
117
|
await this.communicationService.updateConfigStatus(hubId, status);
|
|
118
|
-
return { message: 'Configuration
|
|
118
|
+
return { message: 'Configuration updated' };
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
@Post('gmail/oauth/init')
|
|
@@ -328,7 +328,7 @@ export class CommunicationService {
|
|
|
328
328
|
provider?: string;
|
|
329
329
|
},
|
|
330
330
|
): Promise<Array<CommunicationHub & { linkedSource?: string; configDetails?: any }>> {
|
|
331
|
-
const where: any = { level_id: levelId, level_type: levelType };
|
|
331
|
+
const where: any = { level_id: levelId, level_type: levelType, status: 1 };
|
|
332
332
|
|
|
333
333
|
if (filters?.communication_config_type) {
|
|
334
334
|
where.communication_config_type = filters.communication_config_type;
|
|
@@ -30,9 +30,9 @@ 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
34
|
const result = await this.userService.checkEmailExists({
|
|
35
|
-
|
|
35
|
+
email_id,
|
|
36
36
|
subdomain,
|
|
37
37
|
});
|
|
38
38
|
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
|
-
|
|
305
|
+
email_id: string;
|
|
306
306
|
subdomain: string;
|
|
307
307
|
}): Promise<any> {
|
|
308
|
-
const {
|
|
308
|
+
const { email_id, subdomain } = data;
|
|
309
309
|
|
|
310
|
-
|
|
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(
|
|
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.');
|