pages.controller.js 342 B

1234567891011121314
  1. /**
  2. * Created by zhengguorong on 16/11/4.
  3. */
  4. var Pages = require('../api/pages/pages.model')
  5. module.exports.findByLoginId = (req, res) => {
  6. var loginId = req.user.loginId
  7. return Pages.find({ loginId: loginId }).exec()
  8. }
  9. // Gets a single Pages from the DB
  10. module.exports.findById = (id) => {
  11. return Pages.findById(id).exec()
  12. }