/* Magic Mirror
 * Node Helper: MotionEye
 *
 * By Cato Antonsen (https://github.com/CatoAntonsen)
 * MIT Licensed.
 */

var NodeHelper = require("node_helper");


module.exports = NodeHelper.create({
	start: function() {
		console.log("Starting module: " + this.name);
	},

	socketNotificationReceived: function(notification, config) {
		var self = this;
		if (notification === "CONFIG") {
			self.config = config;
			
			if (config.autoHide) {
				this.expressApp.get('/motioneye/:id', function (req, res) {
					console.log("Motion registered");
					res.send('Motion registered: ' + req.params.id);
					self.sendSocketNotification("MotionEyeShow", req.params.id);
				});
				this.expressApp.get('/motioneye/:id/hide', function (req, res) {
					console.log("Hide registered");
					res.send('Hide registered: ' + req.params.id);
					self.sendSocketNotification("MotionEyeHide", req.params.id);
				});
			} else {
				self.sendSocketNotification("MotionEyeShow", undefined);
			}
			return;
		}
	},
	
});

@@ -475,19 +475,26 @@
 tioneye/
+hide/
 :id
+*?
 ', funct
@@ -528,22 +528,20 @@
 le.log(%22
-Motion
+Hide
  registe
@@ -562,22 +562,20 @@
 s.send('
-Motion
+Hide
  registe
@@ -642,20 +642,20 @@
 otionEye
-Show
+Hide
 %22, req.p
@@ -712,21 +712,18 @@
 neye/:id
-/hide
+*?
 ', funct
@@ -749,36 +749,38 @@
 %09%09%09console.log(%22
-Hide
+Motion
  registered%22);%0A%09
@@ -785,36 +785,38 @@
 %0A%09%09%09%09%09res.send('
-Hide
+Motion
  registered: ' +
@@ -867,36 +867,36 @@
 ation(%22MotionEye
-Hide
+Show
 %22, req.params.id

Change the hide function to work in a better way to not brake other functionallity.