This file contains hidden or 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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
This file contains hidden or 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
import com.mongodb._ | |
import org.bson.types.ObjectId | |
trait MongoDynamic extends Dynamic { | |
def applyDynamic(name: String)(args: Any*): MongoDynamic | |
def expand[A : Manifest]: Option[A] | |
} | |
object EmptyMongoDynamic extends MongoDynamic { | |
override def applyDynamic(name: String)(args: Any*): MongoDynamic = EmptyMongoDynamic |