Skip to content

Commit

Permalink
chore: fix linting issue introduced by upgraded xo
Browse files Browse the repository at this point in the history
  • Loading branch information
lholmquist committed Apr 6, 2020
1 parent 3227f76 commit 31fe1f3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/swapi-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ function sendRequest (options) {
return Promise.resolve(jsonBody[value]);
}

const p = jsonBody[value].map(val => {
if (val.includes(BASE_URL)) {
return makeRequest(val);
const p = jsonBody[value].map(value_ => {
if (value_.includes(BASE_URL)) {
return makeRequest(value_);
}

return Promise.resolve(val);
return Promise.resolve(value_);
});

return Promise.all(p);
Expand Down Expand Up @@ -91,27 +91,27 @@ module.exports = {
return makeRequest(url);
},
getPerson (options) {
const opts = parseOptions(options);
return makeRequest('people' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('people' + (options_.id ? '/' + options_.id : '/'));
},
getStarship (options) {
const opts = parseOptions(options);
return makeRequest('starships' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('starships' + (options_.id ? '/' + options_.id : '/'));
},
getVehicle (options) {
const opts = parseOptions(options);
return makeRequest('vehicles' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('vehicles' + (options_.id ? '/' + options_.id : '/'));
},
getFilm (options) {
const opts = parseOptions(options);
return makeRequest('films' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('films' + (options_.id ? '/' + options_.id : '/'));
},
getSpecies (options) {
const opts = parseOptions(options);
return makeRequest('species' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('species' + (options_.id ? '/' + options_.id : '/'));
},
getPlanets (options) {
const opts = parseOptions(options);
return makeRequest('planets' + (opts.id ? '/' + opts.id : '/'));
const options_ = parseOptions(options);
return makeRequest('planets' + (options_.id ? '/' + options_.id : '/'));
}
};

0 comments on commit 31fe1f3

Please sign in to comment.