Skip to content

Instantly share code, notes, and snippets.

@JamyDev
Created Dec 27, 2012
Embed
What would you like to do?
jugglingdb-mongodb issue
module.exports = function (compound) {
compound.models.Servertype.all(function (err, servertypes) {
compound.routeMapper.namespace('scpad', function (scpad) {
servertypes.forEach(function (servertype) {
console.log(servertype);
compound.models.Addon.all({where: {servertype: servertype.id}}, function (err, addons) {
console.log(addons);
scpad.namespace('scpad/'+servertype.token, function (st) {
addons.forEach(function (addon) {
st.namespace(addon.token, function (ad) {
ad.all(':controller/:action');
ad.all(':controller/:action/:id');
});
});
});
});
});
});
});
}
0.0.4-0:
Line 8: { name: 'Bukkit',
descr: 'Bukkit',
token: 'bukkit',
locked: null,
active: '1',
created: '',
modified: '',
id: '5076e4ec2d52473004000001' }
{ name: 'Backend',
descr: 'The backend for SpaceCP',
token: 'scpbackend',
locked: null,
active: '1',
created: '',
modified: '',
id: '509a986bd09d53c417000001' }
Line 10: [ { servertype: '5076e4ec2d52473004000001',
name: 'Plugins',
token: 'plugins',
description: 'Plugins page',
locked: null,
config: '',
id: '5097f0fffccfca4806000001' } ]
Line 10: [ { servertype: '509a986bd09d53c417000001',
name: 'Dashboard',
token: 'dashboard',
description: 'The Dashboard for SpaceCP\'s backend',
locked: null,
config: '',
id: '509a989ed09d53c417000002' },
{ servertype: '509a986bd09d53c417000001',
name: 'Users',
token: 'users',
description: 'The Users page for the SpaceCP backend',
locked: null,
config: '',
id: '509eb52c6240a04c08000001' },
{ servertype: '509a986bd09d53c417000001',
name: 'Servers',
token: 'servers',
description: 'The Dashboard for SpaceCP\'s backend',
locked: null,
config: '',
id: '50d5e083d30c340032000001' },
{ servertype: '509a986bd09d53c417000001',
name: 'Settings',
token: 'settings',
description: 'The Settings page for the SpaceCP backend',
locked: false,
config: '',
id: '50d9bbbd11951e0414000001' } ]
-----------------------------------------------
0.0.4-1:
Line 8: { _id: 5076e4ec2d52473004000001,
name: 'Bukkit',
descr: 'Bukkit',
token: 'bukkit',
locked: null,
active: '1',
created: '',
modified: '',
id: 5076e4ec2d52473004000001 }
Line 8: { name: 'Backend',
descr: 'The backend for SpaceCP',
token: 'scpbackend',
locked: null,
active: '1',
created: '',
modified: '',
id: 509a986bd09d53c417000001,
_id: 509a986bd09d53c417000001 }
Line 10: []
Line 10: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment