Skip to content

Commit acbeece

Browse files
committed
Fix the auto-add ID stuff
1 parent 3ca124e commit acbeece

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ exports.api = function(args, opts) {
5050
if(add.trim()[0] != 'y') {
5151
console.log("");
5252
console.log("Okay! To do it yourself, edit "+file.split('/').slice(-1)[0].yellow+" and add the following 'x-api-id' line:");
53-
exampleId(apiId, file);
53+
exampleId(file, apiId);
5454

5555
console.log("");
5656
console.log("Make sure you commit the changes so your team is all using the same ID.");
@@ -65,7 +65,7 @@ exports.api = function(args, opts) {
6565
} else {
6666
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:");
6767

68-
exampleId(apiId, file);
68+
exampleId(file, apiId);
6969

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

utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ exports.addId = function(file, id) {
117117

118118
if(file.match(/json$/)) {
119119
try {
120-
JSON.parse(content);
120+
JSON.parse(contents);
121121
} catch(e) {
122122
return false;
123123
}

0 commit comments

Comments
 (0)