Skip to content

Commit

Permalink
feat: update ses config (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
wielopolski authored Nov 4, 2024
1 parent fe65e6f commit e7b0760
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
AWS_ACCESS_KEY_ID: ""
AWS_SECRET_ACCESS_KEY: ""
AWS_BUCKET_NAME: ""
SES_EMAIL: "[email protected]"
STRIPE_SECRET_KEY: "test_secret"
STRIPE_PUBLISHABLE_KEY: "test_secret"
STRIPE_WEBHOOK_SECRET: "test_secret"
Expand Down
2 changes: 2 additions & 0 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ AWS_REGION=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=

SES_EMAIL=

# STRIPE
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class AuthService {
subject: "Welcome to our platform",
text: emailTemplate.text,
html: emailTemplate.html,
from: "[email protected]",
from: process.env.SES_EMAIL || "",
});

return newUser;
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/common/configuration/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const schema = Type.Object({

export type EmailConfigSchema = Static<typeof schema>;

const valdateEmailConfig = configValidator(schema);
const validateEmailConfig = configValidator(schema);

export default registerAs("email", (): EmailConfigSchema => {
const values = {
Expand All @@ -27,5 +27,5 @@ export default registerAs("email", (): EmailConfigSchema => {
EMAIL_ADAPTER: process.env.EMAIL_ADAPTER,
};

return valdateEmailConfig(values);
return validateEmailConfig(values);
});
4 changes: 2 additions & 2 deletions apps/api/src/common/configuration/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const schema = Type.Object({

type JWTConfig = Static<typeof schema>;

const valdateJWTConfig = configValidator(schema);
const validateJWTConfig = configValidator(schema);

export default registerAs("jwt", (): JWTConfig => {
const values = {
Expand All @@ -19,5 +19,5 @@ export default registerAs("jwt", (): JWTConfig => {
expirationTime: process.env.JWT_EXPIRATION_TIME,
};

return valdateJWTConfig(values);
return validateJWTConfig(values);
});

0 comments on commit e7b0760

Please sign in to comment.