Public API for a society manager application

view-accepted-events.js 438B

1234567891011121314151617181920212223
  1. var event_controller = require("./../../presenters/event-controller.js");
  2. module.exports = {
  3. perform: function (a,b) {
  4. perform(a,b);
  5. }
  6. }
  7. var perform = function (req, res) {
  8. var auth = req.body.auth || req.query.auth;
  9. if (auth) {
  10. event_controller.get_all_accepted_events(auth, function (response) {
  11. res.send(response);
  12. });
  13. } else {
  14. res.send({
  15. "accepted_events": [],
  16. "error": 2
  17. });
  18. }
  19. };