From acc127467302b29a4d4586fa05809d3ae89e6ce2 Mon Sep 17 00:00:00 2001 From: gcharang <21151592+gcharang@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:30:52 +0530 Subject: [PATCH] update --- utils/get_file_author_data.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/utils/get_file_author_data.js b/utils/get_file_author_data.js index cc886eed..55ef747a 100644 --- a/utils/get_file_author_data.js +++ b/utils/get_file_author_data.js @@ -39,12 +39,6 @@ const fileData = {}; for (const username in authorsData) { const imageUrl = authorsData[username].avatar_url - - // const { response: imgResponse, headers: respHeaders } = await httpsGet(imageUrl, options) - - // const fileExt = respHeaders["content-type"].split("/")[1] - // const imgFilename = `./src/images/authors/${username}.${fileExt}` - // fs.writeFileSync(imgFilename, imgResponse) const imgName = await downloadImage(imageUrl, username) authorsData[username].image = imgName } @@ -165,9 +159,6 @@ const getAllFileData = (filepath) => { }; function filePathToRoute(filePath) { - // Convert Windows-style path separators to Unix-style - // const normalizedPath = filePath.replace(/\\/g, "/"); - const route = filePath .replace(/(\/index)?\.[^.]+$/, "") // Remove the file extension and "index" suffix if present .replace(/^.*\/pages\/?/, ""); // Remove the "pages" directory prefix and add a leading slash