Skip to content

Commit

Permalink
update common
Browse files Browse the repository at this point in the history
  • Loading branch information
furknyavuz committed Jan 27, 2022
1 parent 5f1f945 commit 0ca4aac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions app/controller/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class AuthController {
/**
* sign up user
* @param db database
* @param message_queue_provider message queue
* @param user user
*/
signup = async (
Expand Down Expand Up @@ -68,7 +69,7 @@ export class AuthController {
email: user.email,
accountVerificationToken: verificationToken,
clientVerificationSuccessUrl:
this.environment.args().extentedArgs?.clientVerificationSuccessUrl,
this.environment.args().extendedArgs?.clientVerificationSuccessUrl,
} as AccountVerificationMailActionParams;
const message = {
sender: MessageQueueChannelType.AUTH,
Expand Down Expand Up @@ -188,7 +189,7 @@ export class AuthController {
email: user.email,
passwordResetToken,
clientResetPasswordUrl:
this.environment.args().extentedArgs?.clientResetPasswordUrl,
this.environment.args().extendedArgs?.clientResetPasswordUrl,
} as ForgetPasswordMailActionParams;
const message = {
sender: MessageQueueChannelType.AUTH,
Expand Down
15 changes: 7 additions & 8 deletions environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import {
DbArgs,
EnvArgs,
ExtendedArgs,
MailArgs,
TokenArgs,
} from '@open-template-hub/common';

export class Environment {
constructor(private _args: EnvArgs = {} as EnvArgs) {
var tokenArgs = {
const tokenArgs = {
accessTokenExpire: process.env.ACCESS_TOKEN_EXPIRE,
accessTokenSecret: process.env.ACCESS_TOKEN_SECRET,
refreshTokenExpire: process.env.REFRESH_TOKEN_EXPIRE,
Expand All @@ -22,18 +21,18 @@ export class Environment {
verificationTokenSecret: process.env.VERIFICATION_TOKEN_SECRET,
} as TokenArgs;

var dbArgs = {
postgreSqlUri: process.env.DATABASE_URL,
postgreSqlConnectionLimit: process.env.POSTGRESQL_CONNECTION_LIMIT,
const dbArgs = {
postgresqlUri: process.env.DATABASE_URL,
postgresqlConnectionLimit: process.env.POSTGRESQL_CONNECTION_LIMIT,
} as DbArgs;

var extentedArgs = {
const extendedArgs = {
clientResetPasswordUrl: process.env.CLIENT_RESET_PASSWORD_URL,
clientUrl: process.env.CLIENT_URL,
clientVerificationSuccessUrl: process.env.CLIENT_VERIFICATION_SUCCESS_URL,
} as ExtendedArgs;

var mqArgs = {
const mqArgs = {
messageQueueConnectionUrl: process.env.CLOUDAMQP_URL,
authServerMessageQueueChannel: process.env.AUTH_SERVER_QUEUE_CHANNEL,
orchestrationServerMessageQueueChannel:
Expand All @@ -44,7 +43,7 @@ export class Environment {
tokenArgs,
dbArgs,
mqArgs,
extentedArgs,
extendedArgs,
} as EnvArgs;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"outdated": "node dependency-checker.ts > docs/OUTDATED.md"
},
"dependencies": {
"@open-template-hub/common": "^3.2.0",
"@open-template-hub/common": "^3.2.1",
"@types/bcrypt": "^5.0.0",
"@types/capitalize": "^2.0.0",
"@types/cors": "^2.8.9",
Expand Down

0 comments on commit 0ca4aac

Please sign in to comment.