Procházet zdrojové kódy

fixed logger in notifications builder

Henry Oswald před 10 roky
rodič
revize
7dad0427e8

+ 2 - 2
services/web/app/coffee/Features/Notifications/NotificationsBuilder.coffee

@@ -1,15 +1,15 @@
-
+logger = require("logger-sharelatex")
 NotificationsHandler = require("./NotificationsHandler")
 NotificationsHandler = require("./NotificationsHandler")
 
 
 module.exports = 
 module.exports = 
 
 
 	groupPlan: (user, licence)->
 	groupPlan: (user, licence)->
 		key : "join-sub-#{licence.subscription_id}"
 		key : "join-sub-#{licence.subscription_id}"
-		logger.log user_id:user_id, key:key, "creating notification key for user"
 		create: (callback = ->)->
 		create: (callback = ->)->
 			messageOpts = 
 			messageOpts = 
 				groupName: licence.name
 				groupName: licence.name
 				subscription_id: licence.subscription_id
 				subscription_id: licence.subscription_id
+			logger.log user_id:user._id, key:key, "creating notification key for user"
 			NotificationsHandler.createNotification user._id, @key, "notification_group_invite", messageOpts, callback
 			NotificationsHandler.createNotification user._id, @key, "notification_group_invite", messageOpts, callback
 
 
 		read: (callback = ->)->
 		read: (callback = ->)->