rez_core 2.2.205 → 2.2.207

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.205",
3
+ "version": "2.2.207",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -136,6 +136,12 @@ export class LoginController {
136
136
  );
137
137
 
138
138
  const { accessToken, appcode } = data;
139
+ if (data.slug) {
140
+ return res.redirect(
141
+ `https://${data.slug}.${this.configService.get('DOMAIN_URL')}/auth?token=${accessToken}&appcode=${appcode}`,
142
+ );
143
+ }
144
+
139
145
  return res.redirect(
140
146
  `${this.configService.get('BASE_URL')}/auth?token=${accessToken}&appcode=${appcode}`,
141
147
  );
@@ -180,12 +180,24 @@ export class LoginService {
180
180
  }
181
181
 
182
182
  // 🔹 Step 8: Return response
183
+
184
+ const org = await this.organizationRepository.findOrganizationById(
185
+ user.organization_id,
186
+ );
187
+ let slug: string;
188
+ if (org) {
189
+ slug = org.subdomain;
190
+ } else {
191
+ throw new BadRequestException();
192
+ }
193
+
183
194
  return {
184
195
  success: true,
185
196
  accessToken: token,
186
197
  appcode: defaultAccess.appcode,
187
198
  level_type: defaultAccess.level_type,
188
199
  level_id: defaultAccess.level_id,
200
+ slug: slug,
189
201
  };
190
202
  }
191
203
 
@@ -11,6 +11,7 @@ CLIENT_ID: '819281384645-2tnuvm80sul1n2ahqa4eg6kjd19pnbu9.apps.googleusercontent
11
11
  CLIENT_SECRET: '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'
12
12
  CALLBACK_URL: 'http://localhost:5001/auth/google/callback'
13
13
  BASE_URL: 'http://localhost:5001'
14
+ DOMAIN_URL: 'rezolut.in'
14
15
  OTP_EXPIRY: '10'
15
16
  OTP_LENGTH: '6'
16
17
  VERIFY_OTP: 'false'