Skip to content

Commit

Permalink
feat: Add method chaining in mail-service.js (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmsw committed Oct 16, 2020
1 parent 9aaea2e commit 0cd41f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/mail/src/classes/mail-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class MailService {
*/
setClient(client) {
this.client = client;

return this;
}

/**
* SendGrid API key passthrough for convenience.
*/
setApiKey(apiKey) {
this.client.setApiKey(apiKey);

return this;
}

/**
Expand Down Expand Up @@ -66,6 +70,8 @@ class MailService {
}
this.substitutionWrappers[0] = left;
this.substitutionWrappers[1] = right;

return this;
}

/**
Expand Down

0 comments on commit 0cd41f7

Please sign in to comment.