Skip to content

Commit

Permalink
fix: emailQueue params given to the notification service
Browse files Browse the repository at this point in the history
  • Loading branch information
alpemreelmas committed May 15, 2024
1 parent 905e315 commit cf5437b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/deploy-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ jobs:
- name: Write .env file
run: |
echo "${{ secrets.ENV_FILE }}" > .env
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build docker_compose
run: docker-compose up -d --build
- name: Build application
run: docker-compose exec -T service npm run build
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy application
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USERNAME}@${HOSTNAME} '
- id: deploy
uses: bitovi/github-actions-deploy-docker-to-ec2@v1.0.1
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_default_region: eu-north-1

aws_elb_app_port: 3000 # This should match the docker exposed port. Defaults to 3000.
cd /<path to your cloned github repository on the server> &&
git checkout main &&
git fetch --all &&
git reset --hard origin/main &&
git pull origin main &&
docker-compose up -d --build
'
2 changes: 1 addition & 1 deletion src/auth/services/reset-password.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class ResetPasswordService {
{ password: bcrypt.hashSync(resetPasswordDto.newPassword, 10) },
);
this.notificationService.sendNotification(
new resetPasswordNotification(user),
new resetPasswordNotification(user, this.emailQueue),
);
await this.ResetPasswordModel.deleteOne({ resetToken });
}
Expand Down

0 comments on commit cf5437b

Please sign in to comment.