This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, | |
'withCreator': function(req, res){ | |
Discussion.find({ | |
project: req.param("project") | |
}) | |
.populate("comments") | |
.exec(function(err, discussions){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get all unique tags from moodboard images. | |
$scope.moodboard.tags = function(){ | |
return _.uniq( | |
_.reduce($scope.moodboard.images, function(memo, image){ | |
return memo.concat(image.tags); | |
}, []) | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"private": true, | |
"version": "0.0.0", | |
"description": "a Sails application", | |
"keywords": [], | |
"dependencies": { | |
"sails": "0.10.0-rc3", | |
"sails-mysql": "0.10.0-rc2", | |
"ejs": "~0.8.4", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Local environment settings | |
* | |
* While you're DEVELOPING your app, this config file should include | |
* any settings specifically for your development computer (db passwords, etc.) | |
* | |
* When you're ready to deploy your app in PRODUCTION, you can always use this file | |
* for configuration options specific to the server where the app will be deployed. | |
* But environment variables are usually the best way to handle production settings. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'projects': function(req, res){ | |
User.findOne(req.session.user.id) | |
.populate("projects") | |
.populate("account") | |
.exec(function(err, user){ | |
res.json(user, 200); | |
}); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
migrate: 'alter', | |
schema: true, | |
attributes: { | |
//Name of the Project | |
name: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bcrypt = require('bcrypt-nodejs'); | |
module.exports = { | |
migrate: 'alter', | |
schema: true, | |
attributes: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"private": true, | |
"version": "0.0.0", | |
"description": "a Sails application", | |
"keywords": [], | |
"dependencies": { | |
"sails": "~0.10.0-rc4", | |
"sails-mysql": "~0.10.0-rc3", | |
"ejs": "~0.8.4", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"private": true, | |
"version": "0.0.0", | |
"description": "a Sails application", | |
"keywords": [], | |
"dependencies": { | |
"sails": "~0.10.0-rc4", | |
"sails-mysql": "~0.10.0-rc3", | |
"ejs": "~0.8.4", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'timeline': function(req, res){ | |
Project.findOne(req.param("id")) | |
.populate("discussions") | |
.populate("moodboards") | |
.exec(function(err, project){ | |
var retval = []; | |
//First, do all the stuff for discussions |
OlderNewer