|
@@ -40,9 +40,7 @@ cache.sub('station.queueUpdate', stationId => {
|
|
});
|
|
});
|
|
|
|
|
|
cache.sub('station.create', stationId => {
|
|
cache.sub('station.create', stationId => {
|
|
- console.log(111);
|
|
|
|
stations.initializeStation(stationId, (err, station) => {
|
|
stations.initializeStation(stationId, (err, station) => {
|
|
- console.log(err, station);
|
|
|
|
//TODO Emit to homepage and admin station page
|
|
//TODO Emit to homepage and admin station page
|
|
if (!err) {
|
|
if (!err) {
|
|
io.io.to('home').emit("event:stations.created", station);
|
|
io.io.to('home').emit("event:stations.created", station);
|
|
@@ -331,11 +329,8 @@ module.exports = {
|
|
}
|
|
}
|
|
|
|
|
|
], (err, station) => {
|
|
], (err, station) => {
|
|
- console.log(1234567);
|
|
|
|
if (err) throw err;
|
|
if (err) throw err;
|
|
- console.log(123456789);
|
|
|
|
cache.pub('station.create', data._id);
|
|
cache.pub('station.create', data._id);
|
|
- console.log(123456723213);
|
|
|
|
return cb(null, { 'status': 'success', 'message': 'Successfully created station.' });
|
|
return cb(null, { 'status': 'success', 'message': 'Successfully created station.' });
|
|
});
|
|
});
|
|
}),
|
|
}),
|