mirror of
https://github.com/fergalmoran/roboto-promoto.git
synced 2025-12-22 09:37:37 +00:00
19 lines
385 B
JavaScript
19 lines
385 B
JavaScript
'use strict';
|
|
|
|
var mongoose = require('mongoose'),
|
|
Promotion = mongoose.model('Promotion'),
|
|
Thing = mongoose.model('Thing');
|
|
|
|
/**
|
|
* Get awesome things
|
|
*/
|
|
exports.awesomeThings = function(req, res) {
|
|
return Thing.find(function (err, things) {
|
|
if (!err) {
|
|
return res.json(things);
|
|
} else {
|
|
return res.send(err);
|
|
}
|
|
});
|
|
};
|