modules/orionode/lib/shared/db/sharedProjects.js
function removeProject(project) {
		return sharedProject.findOne({'location': project}).exec()
		.then(function(doc) {
			if (doc.users.length > 0) {
				return userProjectsCollection.removeProjectReferences(doc.users, project).exec();
			}
		})
		.then(function() {
			return sharedProject.remove({location: project}).exec();
		});
	}
function removeProject(project) {
		return sharedProject.findOne({'location': project}).exec()
		.then(function(doc) {
			if (doc.users.length > 0) {
				return userProjectsCollection.removeProjectReferences(doc.users, project).exec();
			}
		})
		.then(function() {
			return sharedProject.remove({location: project}).exec();
		});
	}
function removeProject ( project ) { return sharedProject . findOne ( { 'location' : project } ) . exec ( ) . then ( function ( doc ) { if ( doc . users . length > 0 ) { return userProjectsCollection . removeProjectReferences ( doc . users , project ) . exec ( ) ; } } ) . then ( function ( ) { return sharedProject . remove ( { location : project } ) . exec ( ) ; } ) ; }
Removes project from shared projects.
Also removes all references from the other table.
Removes project from shared projects . Also removes all references from the other table .