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
ThemeDoc.collection.find({_id: mongoose.Types.ObjectId(themeId)}, {}, {'limit': 1}).toArray(function (err, themes) { | |
//console.log(themes); | |
if (themes.length == 1) { | |
QuestionDoc.collection.find({'theme': mongoose.Types.ObjectId(themeId)}, {}, {'limit': 3}).toArray(function(err, questions) { | |
//console.log(questions); | |
if(questions.length == 3) { |
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
'use strict'; | |
/** | |
* Module dependencies. | |
*/ | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema, | |
_ = require('lodash'), | |
async = require('async'); |
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
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>{{title}}</title> | |
<!-- General META --> | |
<meta charset="utf-8"> | |
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
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
'use strict'; | |
/** | |
* Module dependencies. | |
*/ | |
var init = require('./config/init')(), | |
config = require('./config/config'), | |
mongoose = require('mongoose'); | |
/** | |
* Main application entry file. |
NewerOlder