Skip to content

Commit f036993

Browse files
committed
Fixed tests
1 parent c6267f1 commit f036993

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/server/services/sendGrid.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ export const sendEmail = async (req, res) => {
1818
try {
1919
const msg = req.body;
2020
// const result = await sgMail.send(msg);
21-
const query = req.query;
22-
if (query.throw) throw new Error('tyr/catch error');
23-
const result = {a: 1};
24-
return result;
21+
if (req.query.throw) throw new Error('tyr/catch error');
22+
return msg;
2523
} catch (error) {
2624
logger.error(error);
2725
const { message, code, response } = error;

0 commit comments

Comments
 (0)