Merge branch 'devel' of https://github.com/VulcanJS/Vulcan into devel

This commit is contained in:
SachaG 2018-02-17 10:58:12 +09:00
commit be65866d25
3 changed files with 9 additions and 4 deletions

View file

@ -52,6 +52,10 @@ const schema = {
},
},
},
'hooks.$': {
type: Object,
}
};
export default schema;

View file

@ -59,7 +59,7 @@ VulcanEmail.generateTextVersion = html => {
});
}
VulcanEmail.send = (to, subject, html, text) => {
VulcanEmail.send = (to, subject, html, text, throwErrors) => {
// TODO: limit who can send emails
// TODO: fix this error: Error: getaddrinfo ENOTFOUND
@ -95,6 +95,7 @@ VulcanEmail.send = (to, subject, html, text) => {
} catch (error) {
console.log("// error while sending email:"); // eslint-disable-line
console.log(error); // eslint-disable-line
if (throwErrors) throw error;
}
} else {

View file

@ -1,5 +1,5 @@
import Users from './collection.js';
import CryptoJS from 'crypto-js';
import md5 from 'crypto-js/md5';
Users.avatar = {
@ -35,7 +35,7 @@ Users.avatar = {
hash: function (string) {
var self = this;
// eslint-disable-next-line babel/new-cap
return CryptoJS.MD5(self.cleanString(string)).toString()
return md5(self.cleanString(string)).toString()
},
/**