Skip to content

Commit d887e4a

Browse files
committed
rename
1 parent 4bc1987 commit d887e4a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

spec/CloudCode.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,7 +3169,7 @@ describe('afterLogin hook', () => {
31693169
});
31703170
});
31713171

3172-
describe('sendMail', () => {
3172+
describe('sendEmail', () => {
31733173
it('can send email via Parse.Cloud', async done => {
31743174
const emailAdapter = {
31753175
sendMail: mailData => {
@@ -3182,13 +3182,13 @@ describe('sendMail', () => {
31823182
emailAdapter: emailAdapter,
31833183
});
31843184
const mailData = { to: 'test' };
3185-
await Parse.Cloud.sendMail(mailData);
3185+
await Parse.Cloud.sendEmail(mailData);
31863186
});
31873187

31883188
it('cannot send email without adapter', async () => {
31893189
const logger = require('../lib/logger').logger;
31903190
spyOn(logger, 'error').and.callFake(() => {});
3191-
await Parse.Cloud.sendMail({});
3191+
await Parse.Cloud.sendEmail({});
31923192
expect(logger.error).toHaveBeenCalledWith(
31933193
'Failed to send email because no mail adapter is configured for Parse Server.'
31943194
);

src/cloud-code/Parse.Cloud.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,19 +536,19 @@ ParseCloud.beforeConnect = function (handler, validationHandler) {
536536
* **Requires a mail adapter to be configured for Parse Server.**
537537
*
538538
* ```
539-
* Parse.Cloud.sendMail({
539+
* Parse.Cloud.sendEmail({
540540
* from: 'Example <test@example.com>',
541541
542-
* subject: 'Test email.',
543-
* text: 'This email is a test'
542+
* subject: 'Test email',
543+
* text: 'This email is a test.'
544544
* });
545545
*```
546546
*
547547
* @method sendMail
548-
* @name Parse.Cloud.sendMail
548+
* @name Parse.Cloud.sendEmail
549549
* @param {Object} data The object of the mail data to send
550550
*/
551-
ParseCloud.sendMail = function (data) {
551+
ParseCloud.sendEmail = function (data) {
552552
const config = Config.get(Parse.applicationId) || {};
553553
const emailAdapter = config.userController.adapter;
554554
if (!emailAdapter) {

0 commit comments

Comments
 (0)