Skip to content

Commit

Permalink
chore: Remove logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
amiller-gh committed Mar 27, 2021
1 parent 34a08d7 commit b421815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "loll",
"version": "0.2.1",
"version": "0.2.2",
"description": "REST apps for the lazy developer.",
"main": "dist/src/index.js",
"scripts": {
Expand Down
8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ function discoverAPI(router: Express.Router, apiDir: string){

// Construct both the absolute file path, and public facing API path
const filePath = path.join(root, fileStats.name);
console.log(filePath);
let apiPath = path.join(root, fileStats.name).split(path.sep).map((part) => {
console.log(part)
const apiPath = path.join(root, fileStats.name).split(path.sep).map((part) => {
if (part.startsWith('[') && part.endsWith(']')) {
part = `:${part.slice(1, -1)}`;
}
Expand All @@ -152,9 +150,7 @@ function discoverAPI(router: Express.Router, apiDir: string){
}

return part;
}).join(path.sep);
console.log(apiPath);
apiPath = apiPath.replace(apiDir, '').replace(/\/index.js$/, '').replace(/.js$/, '');
}).join(path.sep).replace(apiDir, '').replace(/\/index.js$/, '').replace(/.js$/, '');

// Push them to our queue. This later sorted in order of route precedence.
queue.push({ apiPath, filePath });
Expand Down

0 comments on commit b421815

Please sign in to comment.