-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #501 from flovilmart/app-agnostic-controllers
Refactors PushController and FilesController to support multiple apps
- Loading branch information
Showing
17 changed files
with
310 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.