{"interface":":4984","adminInterface":":4985","log":["*"],"databases":{"database":{"server":"http://104.155.33.203:8091/","bucket":"default","users":{"GUEST":{"disabled":false,"admin_channels":["*"]}},"sync":`function(doc,oldDoc){if(!doc.owner)throw({forbidden:"Documents must have a owner"});varwebChannelForOwner='webFor_'+doc.owner;varmobileChannelForOwner='mobileFor_'+doc.owner;varrestaurantForOwner='restaurantFor_'+doc.owner;varliveTillsForOwner='liveTillsFor_'+doc.owner;varpausedTillsForOwner='pausedTillsFor_'+doc.owner;varstatsTillsForOwner='statsTillsFor_'+doc.owner;varchannels=[mobileChannelForOwner,webChannelForOwner];varrestaurantTypes=['Restaurant'];//routechannelsif(restaurantTypes.indexOf(doc.type)!==-1){channels.push(restaurantForOwner);}else{if(doc.status===0){channels.push(liveTillsForOwner);}elseif(doc.status===1){channels.push(pausedTillsForOwner);}else{channels.push(statsTillsForOwner);}}channel(channels);}`}}}
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.