Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO-ISSUE] fix: Delete unused files with redirect #1350

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions request-redirect-delete-files.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const path = require('path');
import fs from 'fs';
import path from 'path';

async function deleteFiles(filePathList) {
for (const item of filePathList) {
Expand All @@ -21,7 +21,7 @@ async function deleteFiles(filePathList) {

function main() {
try {
const jsonFilePath = './request-en-redirects.json';
const jsonFilePath = './request-ptbr-redirects.json';
const data = JSON.parse(fs.readFileSync(jsonFilePath, 'utf8'));

deleteFiles(data);
Expand Down
4 changes: 2 additions & 2 deletions request-validate-status.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const https = require('https');
const fs = require('fs');
import fs from 'fs';
import https from 'https';

function fetchJson(url) {
console.log("Baixando JSON");
Expand Down

This file was deleted.

This file was deleted.

Loading