Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include vendors names and product category in the return response #151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[![CI for ecomm-project for Dynamite](https://github.com/atlp-rwanda/dynamites-ecomm-be/actions/workflows/workflow_for_ecomm.yml/badge.svg)](https://github.com/atlp-rwanda/dynamites-ecomm-be/actions/workflows/workflow_for_ecomm.yml)

[![codecov](https://codecov.io/gh/atlp-rwanda/dynamites-ecomm-be/graph/badge.svg?token=I1G8CMQKBH)](https://codecov.io/gh/atlp-rwanda/dynamites-ecomm-be)
# Dynamites API

# Dynamites API

## Overview

Expand Down Expand Up @@ -63,6 +64,7 @@ Before you run that commands you must have docker installed in your PC
```sh
docker-compose down
```

## Usage

Once the development server is running, you can interact with the API using HTTP requests.
Expand Down
12 changes: 7 additions & 5 deletions src/Notification.vendor/EmailSendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ import dotenv from 'dotenv';

dotenv.config();

async function sendEmail(vendorEmail: string, message_title: string, messageContent: string) {
async function sendEmail(
vendorEmail: string,
message_title: string,
messageContent: string
) {
try {
const transporter = nodemailer.createTransport({
service: 'gmail',
host: 'smtp.gmail.com',
port: 587,
secure: false,
secure: false,
auth: {
user: process.env.EMAIL_USER,
pass: process.env.EMAIL_PASS,
Expand All @@ -25,11 +29,9 @@ async function sendEmail(vendorEmail: string, message_title: string, messageCont
};

await transporter.sendMail(mailOptions);

} catch (error) {
throw error
throw error;
}
}

export default sendEmail;

Loading
Loading