Skip to content

Commit

Permalink
Fix reset password error handling in Parse.js. Fix minor build issues…
Browse files Browse the repository at this point in the history
… in Info.plist
  • Loading branch information
wookiem committed Oct 19, 2016
1 parent b1fd130 commit ed27f38
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
22 changes: 13 additions & 9 deletions ios/snowflake/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>https://snowflake-parse.herokuapp.com</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
Expand All @@ -48,17 +51,18 @@
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Expand Down
14 changes: 7 additions & 7 deletions src/lib/Parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ export class Parse extends Backend {
body: data
})
.then((res) => {
if ((res.status === 200 || res.status === 201)) {
return {}
} else {
res.json().then(function (res) {
throw (res)
})
}
return res.json().then(function(json) {
if ((res.status === 200 || res.status === 201)) {
return {}
} else {
throw (json)
}
})
})
.catch((error) => {
throw (error)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
},
PARSE: {
appId: 'snowflake', // match APP_ID in parse-server's index.js
masterKey: 'F6NmZRK2VBncbdJCJRvPPJWyMLTjzPeWeX', // match MASTER_KEY in parse-server's index.js
masterKey: 'myMasterKey', // match MASTER_KEY in parse-server's index.js
local: {
url: 'http://localhost:1337/parse' // match SERVER_URL in parse-server's index.js
},
Expand Down

0 comments on commit ed27f38

Please sign in to comment.