Skip to content

Updated to pass masterKey for Config get request #575

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

Merged
merged 3 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### NEXT RELEASE

* _Contributing to this repo? Add info about your change here to be included in next release_
* Fix: Config FETCH results in 401 (#339), thanks to [Matt Simms](https://github.com/brndmg)

### 1.0.22

Expand All @@ -18,7 +19,6 @@
* Fix: Can't send push to specific user (#570), thanks to [Dan VanWinkle](https://github.com/dvanwinkle)
* Fix: Download link in footer menu (#567), thanks to [Pavel Ivanov](https://github.com/pivanov)


### 1.0.19

* New: Support for trusting proxies w/ HTTPS
Expand Down
9 changes: 7 additions & 2 deletions src/lib/stores/ConfigStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ function ConfigStore(state, action) {
action.app.setParseKeys();
switch (action.type) {
case ActionTypes.FETCH:
return Parse.Config.get().then(({ attributes }) => {
return Map({ lastFetch: new Date(), params: Map(attributes) });
return Parse._request(
'GET',
'config',
{},
{ useMasterKey: true }
).then((result) => {
return Map({ lastFetch: new Date(), params: Map(result.params) });
});
case ActionTypes.SET:
return Parse._request(
Expand Down