Skip to content

Commit

Permalink
Fix the auto-add ID stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Mar 9, 2017
1 parent 3ca124e commit acbeece
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports.api = function(args, opts) {
if(add.trim()[0] != 'y') {
console.log("");
console.log("Okay! To do it yourself, edit "+file.split('/').slice(-1)[0].yellow+" and add the following 'x-api-id' line:");
exampleId(apiId, file);
exampleId(file, apiId);

console.log("");
console.log("Make sure you commit the changes so your team is all using the same ID.");
Expand All @@ -65,7 +65,7 @@ exports.api = function(args, opts) {
} else {
console.log("We weren't able to add the ID automatically. In "+file.split('/').slice(-1)[0].yellow+", add the following 'x-api-id' line:");

exampleId(apiId, file);
exampleId(file, apiId);

console.log("Make sure you commit the changes so your team is all using the same ID.");

Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ exports.addId = function(file, id) {

if(file.match(/json$/)) {
try {
JSON.parse(content);
JSON.parse(contents);
} catch(e) {
return false;
}
Expand Down

0 comments on commit acbeece

Please sign in to comment.