Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
santiq committed May 9, 2019
1 parent 55e35e7 commit 28b7e7a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/jobs/emailSequence.ts
Expand Up @@ -7,7 +7,7 @@ export default class EmailSequenceJob {
try {
const { email, name }: { [key: string]: string } = job.data;
const mailerServiceInstance = Container.get(MailerService);
await mailerServiceInstance.StartEmailSequence('WelcomeSequence', { email, name});
await mailerServiceInstance.StartEmailSequence('WelcomeSequence', { email, name });
done();
} catch (e) {
console.log('🔥 Error with Email Sequence Job');
Expand Down
2 changes: 1 addition & 1 deletion src/loaders/dependencyInjector.ts
Expand Up @@ -2,7 +2,7 @@ import { Container } from 'typedi';

import agendaFactory from './agenda';

export default ({ mongoConnection, models }: { mongoConnection, models: Array<{ name: string, model: any }> }) => {
export default ({ mongoConnection, models }: { mongoConnection; models: { name: string; model: any }[] }) => {
try {
models.forEach(m => {
Container.set(m.name, m.model);
Expand Down
4 changes: 2 additions & 2 deletions src/loaders/mongoose.ts
@@ -1,6 +1,6 @@
import * as mongoose from 'mongoose'
import * as mongoose from 'mongoose';
import { Db } from 'mongodb';
import config from '../config'
import config from '../config';

export default async (): Promise<Db> => {
const connection = await mongoose.connect(config.databaseURL, { useNewUrlParser: true, useCreateIndex: true });
Expand Down
4 changes: 2 additions & 2 deletions src/services/mailer.ts
Expand Up @@ -10,8 +10,8 @@ export default class MailerService {
return { delivered: 1, status: 'ok' };
}
public StartEmailSequence(sequence: string, user: Partial<IUser>) {
if(!user.email) {
throw new Error('No email provided')
if (!user.email) {
throw new Error('No email provided');
}
// @TODO Add example of an email sequence implementation
// Something like
Expand Down

0 comments on commit 28b7e7a

Please sign in to comment.