Refactors routers

This commit is contained in:
Florent Vilmart
2016-02-19 23:47:44 -05:00
parent 067946c66c
commit 3c4d5159b4
14 changed files with 281 additions and 271 deletions

View File

@@ -0,0 +1,20 @@
// AnalyticsRouter.js
var Parse = require('parse/node').Parse;
import PromiseRouter from '../PromiseRouter';
// Returns a promise that resolves to an empty object response
function ignoreAndSucceed(req) {
return Promise.resolve({
response: {}
});
}
export class AnalyticsRouter extends PromiseRouter {
mountRoutes() {
this.route('POST','/events/AppOpened', ignoreAndSucceed);
this.route('POST','/events/:eventName', ignoreAndSucceed);
}
}