Skip to content

Instantly share code, notes, and snippets.

@SFoskitt
Last active March 13, 2017 19:00
Show Gist options
  • Save SFoskitt/ca0015709331584ccbd6d67cdd010660 to your computer and use it in GitHub Desktop.
Save SFoskitt/ca0015709331584ccbd6d67cdd010660 to your computer and use it in GitHub Desktop.
ExampleService method for POCR endpoint
/**
* 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