Skip to content

Commit f1df2ce

Browse files
committed
refactor: don't use a global variable in createEndpoints()
1 parent ab2425e commit f1df2ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const loadConfig = (endpointsFile) => {
1919
}
2020
};
2121

22-
const createEndpoints = (config) => {
22+
const createEndpoints = (config, resultFile) => {
2323
console.log('Generate', resultFile);
2424
for (let endpoint of config) {
2525
console.log('GET', endpoint.path, '=>', endpoint.get);
@@ -42,4 +42,4 @@ const createEndpoints = (config) => {
4242
};
4343

4444
const config = loadConfig(endpointsFile);
45-
createEndpoints(config);
45+
createEndpoints(config, resultFile);

0 commit comments

Comments
 (0)