-
Notifications
You must be signed in to change notification settings - Fork 33
Feature/update brylie meteor api umbrella. Closes #591 #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
6c218c3
589e055
2053575
4678d55
45be6cc
bd3e1e7
2b3f61d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,11 +42,11 @@ Your `settings.json` file should have the following structure: | |
| "apinf": { | ||
| "host": "https://example.com/" | ||
| }, | ||
| "api_umbrella": { | ||
| "host": "https://example.com/" | ||
| "api_key": "xxx", | ||
| "auth_token": "xxx", | ||
| "base_url": "https://example.com/api-umbrella/" | ||
| "apiUmbrella": { | ||
| "apiKey": "xxx", | ||
| "authToken": "xxx", | ||
| "baseUrl": "https://example.com/api-umbrella/", | ||
| "host": "https://example.com" | ||
| }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not also add a settings.json.example file to the project?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, done. I misunderstood your comment initially.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry, I meant 'adding'. |
||
| "mail": { | ||
| "username": "xxx", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,14 @@ | ||
| Meteor.startup(function () { | ||
| // Create config object for API Umbrella Web interface | ||
| var config = { | ||
| baseUrl: Meteor.settings.apiUmbrella.baseUrl, | ||
| apiKey: Meteor.settings.apiUmbrella.apiKey, | ||
| authToken: Meteor.settings.apiUmbrella.authToken | ||
| }; | ||
|
|
||
| // Create API Umbrella Web object for REST calls | ||
| apiUmbrellaWeb = new ApiUmbrellaWeb(config); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better to write a check here, and in case of failure, halt the application. Consequently, the duplicated if (Meteor.settings.apiUmbrella) checks (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is a good point. However, the server methods may be used outside of the synced cron, so may still need to check for settings. E.g. if we want to sync after some user interaction, such as clicking a 'sync now' button. |
||
| // Check if API Umbrella settings are available | ||
| SyncedCron.add({ | ||
| name: 'Sync API Umbrella Users and API Backends', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 1.0.1