Skip to content

Instantly share code, notes, and snippets.

@RenanSMoura
Created September 29, 2016 00:06
Show Gist options
  • Save RenanSMoura/b131c17e50e62fe875d9010d495dff14 to your computer and use it in GitHub Desktop.
Save RenanSMoura/b131c17e50e62fe875d9010d495dff14 to your computer and use it in GitHub Desktop.
Script delete marcas
var requestify = require('requestify');
var ids = [];
requestify.get('http://notifycar-api.mybluemix.net/fabricante').then(function(response){
for(var i =0; i < response.getBody().length; i++){
ids[i] = response.getBody()[i]._id;
}
for(var x = 0; x < ids.length; x++){
requestify.delete('http://notifycar-api.mybluemix.net/fabricante/' + ids[x]).then(function(response){
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment