sou 7 лет назад
Родитель
Сommit
028df12ac8
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      lib/service/global-notification.js

+ 6 - 6
lib/service/global-notification.js

@@ -39,7 +39,7 @@ class GlobalNotificationService {
    * @param {obejct} page
    * @param {obejct} page
    */
    */
   async notifyPageCreate(page) {
   async notifyPageCreate(page) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(page.path, 'pageCreate');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(page.path, 'pageCreate');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const option = {
     const option = {
       mail: {
       mail: {
@@ -63,7 +63,7 @@ class GlobalNotificationService {
    * @param {obejct} page
    * @param {obejct} page
    */
    */
   async notifyPageEdit(page) {
   async notifyPageEdit(page) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(page.path, 'pageEdit');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(page.path, 'pageEdit');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const option = {
     const option = {
       mail: {
       mail: {
@@ -87,7 +87,7 @@ class GlobalNotificationService {
    * @param {obejct} page
    * @param {obejct} page
    */
    */
   async notifyPageDelete(page) {
   async notifyPageDelete(page) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(page.path, 'pageDelete');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(page.path, 'pageDelete');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const option = {
     const option = {
       mail: {
       mail: {
@@ -111,7 +111,7 @@ class GlobalNotificationService {
    * @param {obejct} page
    * @param {obejct} page
    */
    */
   async notifyPageMove(page, oldPagePath, user) {
   async notifyPageMove(page, oldPagePath, user) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(page.path, 'pageMove');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(page.path, 'pageMove');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const option = {
     const option = {
       mail: {
       mail: {
@@ -136,7 +136,7 @@ class GlobalNotificationService {
    * @param {obejct} page
    * @param {obejct} page
    */
    */
   async notifyPageLike(page, user) {
   async notifyPageLike(page, user) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(page.path, 'pageLike');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(page.path, 'pageLike');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const option = {
     const option = {
       mail: {
       mail: {
@@ -161,7 +161,7 @@ class GlobalNotificationService {
    * @param {obejct} comment
    * @param {obejct} comment
    */
    */
   async notifyComment(comment, path) {
   async notifyComment(comment, path) {
-    const notifications = await this.GlobalNotification.Parent.findSettingByPathAndEvent(path, 'comment');
+    const notifications = await this.GlobalNotification.findSettingByPathAndEvent(path, 'comment');
     const lang = 'en-US'; //FIXME
     const lang = 'en-US'; //FIXME
     const user = await this.User.findOne({_id: comment.creator});
     const user = await this.User.findOne({_id: comment.creator});
     const option = {
     const option = {