Last active
March 13, 2017 19:00
-
-
Save SFoskitt/ca0015709331584ccbd6d67cdd010660 to your computer and use it in GitHub Desktop.
ExampleService method for POCR endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Update Purchase Order Change Request options - separate end point | |
* | |
*/ | |
function updatePocrOptions (options) { | |
if(options){ | |
return $http.put('api/company/settings/updatePocrOptions/', options) | |
.then((response) => { | |
// check for any errors in server response | |
const containsErrors = response.data.success === false; | |
if (containsErrors) { | |
return error('Error updating POCR options'); | |
} | |
return response.data; | |
}) | |
.catch(error); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment