diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 6c0b863..288b36b 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ebf9d9c..f2eb2fe 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,14 @@ - - - - - - - + + + + + + + + @@ -20,7 +21,7 @@ - + @@ -30,19 +31,10 @@ - - - - - - - - - - + @@ -63,20 +55,26 @@ - - + + - + - - - - - + + + + + + + + + + + @@ -86,6 +84,21 @@ + + + + + + + + + + + + + + + @@ -96,17 +109,17 @@ - @@ -121,7 +134,7 @@ - + @@ -151,6 +164,7 @@ + @@ -203,32 +217,34 @@ - - - - - - - + + - + + + + + @@ -238,14 +254,22 @@ - - + + + + + + - - - - - + + + + + + + + + @@ -254,27 +278,10 @@ - - - - - - - - - - - - - - - - - - - + + @@ -287,13 +294,41 @@ - - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UserInterface.js b/UserInterface.js index 8075f5e..23baed6 100644 --- a/UserInterface.js +++ b/UserInterface.js @@ -238,7 +238,13 @@ export default class UserInterface extends React.Component { {method:'PUT', headers:{...this.genHeaders(this.state.token), 'content-type': 'application/json; charset=UTF-8'}, body: JSON.stringify({ "bird_id": bird.id, "alarm": true - })}); + })}) + .then((response) => response.json()) + .then( (output) => { + console.log(output); + }).catch(function (error) { + console.log(error); + }); }); } }}, @@ -248,7 +254,6 @@ export default class UserInterface extends React.Component { // Check if the token exists, and if so try signing in async checkUserSignedIn(){ - let context = this; try { let value = await AsyncStorage.getItem('token'); if (value != null){ @@ -322,7 +327,7 @@ export default class UserInterface extends React.Component { this.setState({ text: val })} />