From fc4ebd6247b17bf24882fee5b51b9f879bce68ef Mon Sep 17 00:00:00 2001 From: Matt Simms Date: Wed, 2 Nov 2016 10:23:15 -0300 Subject: [PATCH 1/2] Updated to pass masterKey for Config get request --- src/lib/stores/ConfigStore.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/stores/ConfigStore.js b/src/lib/stores/ConfigStore.js index 7dfd808b5e..d9702931f9 100644 --- a/src/lib/stores/ConfigStore.js +++ b/src/lib/stores/ConfigStore.js @@ -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( From e31eef2b418ff73bb30099d23fd410238a026862 Mon Sep 17 00:00:00 2001 From: Matt Simms Date: Wed, 2 Nov 2016 10:45:56 -0300 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c7d10b286..b91f14e5d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### NEXT RELEASE * Fix: Can't send push to specific user (#561) +* Fix: Config FETCH results in 401 (#339), thanks to [Matt Simms](https://github.com/brndmg) ### 1.0.19