Skip to content

Commit 69b20a3

Browse files
committed
fix: remove console.log
1 parent 048adf7 commit 69b20a3

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

apps/server/INFRASTRUCTURE.MD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ Minio client for NestJS-mod (Wrapper for https://www.npmjs.com/package/nestjs-mi
493493

494494
| Key | Constraints | Value |
495495
| ------ | ----------- | ----- |
496-
|`events`|**optional**|[ ```{"eventName":"notifications.create","description":"Event that fires after a notification is created","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:24:07.832Z","updatedAt":"2025-04-29T16:24:07.832Z"}}```, ```{"eventName":"notifications.update","description":"Event that fires after a notification is updated","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:24:07.832Z","updatedAt":"2025-04-29T16:24:07.832Z"}}```, ```{"eventName":"notifications.sent","description":"Event that fires after a notification is sent","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:24:07.832Z","updatedAt":"2025-04-29T16:24:07.832Z"}}```, ```{"eventName":"notifications.error","description":"Event that occurs when there is an error sending a notification","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","attempt":2,"error":"Error object","used":false,"createdAt":"2025-04-29T16:24:07.832Z","updatedAt":"2025-04-29T16:24:07.832Z"}}``` ]|
496+
|`events`|**optional**|[ ```{"eventName":"notifications.create","description":"Event that fires after a notification is created","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:31:42.903Z","updatedAt":"2025-04-29T16:31:42.903Z"}}```, ```{"eventName":"notifications.update","description":"Event that fires after a notification is updated","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:31:42.903Z","updatedAt":"2025-04-29T16:31:42.903Z"}}```, ```{"eventName":"notifications.sent","description":"Event that fires after a notification is sent","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","createdAt":"2025-04-29T16:31:42.903Z","updatedAt":"2025-04-29T16:31:42.903Z"}}```, ```{"eventName":"notifications.error","description":"Event that occurs when there is an error sending a notification","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","html":"<a>Hello {{{firstname}}}</a>","externalTenantId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","operationName":"forget-password","recipientData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+999999999"},"subject":"Some subject of email","type":"phone","context":{"firstname":"Firstname"},"senderData":{"externalUserId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","email":"[email protected]","name":"User Name","phone":"+888888888"},"text":"Hello {{{firstname}}}","recipientGroupId":"77af2745-d972-4e1f-994a-fae8ad71d7ab","attempt":2,"error":"Error object","used":false,"createdAt":"2025-04-29T16:31:42.903Z","updatedAt":"2025-04-29T16:31:42.903Z"}}``` ]|
497497

498498
#### Modules that use feature configuration
499499
##### Feature module name: sso
500500

501501
| Key | Constraints | Value |
502502
| ------ | ----------- | ----- |
503-
|`events`|**optional**|[ ```{"eventName":"sso.sign-up","description":"An event that is triggered after a new user registers","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.sign-in","description":"An event that is triggered after a user login","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.complete-sign-up","description":"An event that is triggered after complete a new user registers","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.sign-out","description":"An event that is triggered after a user logout","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.forgot-password","description":"An event that is triggered after a user call forgot password method","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.complete-forgot-password","description":"An event that is triggered after a user calls to confirm a forgotten password change","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.update-profile","description":"An event that fires after user information is updated.","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:24:08.308Z","createdAt":"2025-04-29T16:24:08.308Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:24:08.308Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:24:08.308Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:24:08.308Z","roles":"user","updatedAt":"2025-04-29T16:24:08.308Z","username":"nickname","lang":"en","timezone":0}}``` ]|
503+
|`events`|**optional**|[ ```{"eventName":"sso.sign-up","description":"An event that is triggered after a new user registers","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.sign-in","description":"An event that is triggered after a user login","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.complete-sign-up","description":"An event that is triggered after complete a new user registers","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.sign-out","description":"An event that is triggered after a user logout","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.forgot-password","description":"An event that is triggered after a user call forgot password method","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.complete-forgot-password","description":"An event that is triggered after a user calls to confirm a forgotten password change","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}```, ```{"eventName":"sso.update-profile","description":"An event that fires after user information is updated.","example":{"id":"77af2745-d972-4e1f-994a-fae8ad71d7ab","appData":{"custom":"data"},"birthdate":"2025-04-29T16:31:43.378Z","createdAt":"2025-04-29T16:31:43.378Z","email":"[email protected]","emailVerifiedAt":"2025-04-29T16:31:43.378Z","firstname":"Firstname","gender":"m","lastname":"Lastname","phone":"+888888888","phoneVerifiedAt":"2025-04-29T16:31:43.378Z","picture":"http://example.com/image/77af2745-d972-4e1f-994a-fae8ad71d7ab.jpg","revokedAt":"2025-04-29T16:31:43.378Z","roles":"user","updatedAt":"2025-04-29T16:31:43.378Z","username":"nickname","lang":"en","timezone":0}}``` ]|
504504

505505
### SsoModule
506506
#### Shared providers

libs/core/sso/src/lib/controllers/sso-oauth.controller.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ export class SsoOAuthController {
7373
@UserAgent() userAgent: string
7474
) {
7575
try {
76-
console.log({
77-
include: { SsoUser: true },
78-
where: { verificationCode: ssoOAuthVerificationArgs.verificationCode },
79-
});
8076
let oAuthToken = await this.prismaClient.ssoOAuthToken.findFirstOrThrow({
8177
include: { SsoUser: true },
8278
where: { verificationCode: ssoOAuthVerificationArgs.verificationCode },

libs/core/sso/src/lib/strategies/google/sso-google-oauth.strategy.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ export class SsoGoogleOAuthStrategy implements OnModuleInit {
158158
return undefined;
159159
}
160160
try {
161-
console.log(1);
162161
const oAuthToken = await this.prismaClient.ssoOAuthToken.findFirstOrThrow(
163162
{
164163
include: {
@@ -176,7 +175,6 @@ export class SsoGoogleOAuthStrategy implements OnModuleInit {
176175
},
177176
}
178177
);
179-
console.log(2);
180178
const user = await this.prismaClient.ssoUser.update({
181179
where: {
182180
id: oAuthToken.userId,
@@ -194,7 +192,6 @@ export class SsoGoogleOAuthStrategy implements OnModuleInit {
194192
oAuthToken.SsoUser.lastname || profile.name?.familyName || null,
195193
},
196194
});
197-
console.log(3);
198195
await this.prismaClient.ssoOAuthToken.update({
199196
where: {
200197
id: oAuthToken.id,
@@ -224,11 +221,9 @@ export class SsoGoogleOAuthStrategy implements OnModuleInit {
224221
const password = `${this.oauthProviderName}_${profile.id}`;
225222

226223
try {
227-
console.log(4);
228224
const user = await this.prismaClient.ssoUser.findFirstOrThrow({
229225
where: { email, projectId },
230226
});
231-
console.log(5);
232227
await this.prismaClient.ssoOAuthToken.create({
233228
data: {
234229
accessToken,
@@ -245,7 +240,6 @@ export class SsoGoogleOAuthStrategy implements OnModuleInit {
245240
} catch (err: any) {
246241
this.logger.error(err, err.stack);
247242
if (this.prismaToolsService.isErrorOfRecordNotFound(err)) {
248-
console.log(6);
249243
const user = await this.ssoService.autoSignUp({
250244
projectId,
251245
email,

libs/core/webhook/src/lib/webhook.guard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export class WebhookGuard implements CanActivate {
118118

119119
private getExternalUserIdFromRequest(req: WebhookRequest) {
120120
if (!req.externalUserId || !isUUID(req.externalUserId)) {
121-
console.log(req);
122121
throw new WebhookError(WebhookErrorEnum.FORBIDDEN);
123122
}
124123
return req.externalUserId;

0 commit comments

Comments
 (0)