Created
September 29, 2016 00:06
-
-
Save RenanSMoura/b131c17e50e62fe875d9010d495dff14 to your computer and use it in GitHub Desktop.
Script delete marcas
This file contains hidden or 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
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