Public API for a society manager application

accept-event.js 477B

123456789101112131415161718192021222324
  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 event_id = req.params.eventid;
  9. var auth = req.body.auth || req.query.auth;
  10. if (event_id && auth) {
  11. event_controller.accept_event(event_id, auth, function (response) {
  12. res.send(response);
  13. });
  14. } else {
  15. res.send({
  16. "success": 0,
  17. "error": 3
  18. });
  19. }
  20. };