ResourcefulHumans/template-mailer-aws-lambda

View on GitHub
operations/send.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function send has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const send = (ses, transportRepo, templateRepo, transport, template, body) => {
  const schema = Joi.object().keys({
    transport: Joi.string().required().regex(/^[a-z0-9]+(?!-+$)[a-z0-9-]*$/).lowercase(),
    template: Joi.string().required().regex(/^[a-z0-9]+(?!-+$)[a-z0-9-]*$/).lowercase(),
    to: Joi.string().email().required(),
Severity: Major
Found in operations/send.js - About 3 hrs to fix

    There are no issues that match your filters.

    Category
    Status