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

feat: be GTFS support #47

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

feat: be GTFS support #47

wants to merge 6 commits into from

Conversation

krystxf
Copy link
Owner

@krystxf krystxf commented Nov 20, 2024

Changes

  • fetch data from GTFS files

@krystxf krystxf added enhancement New feature or request backend labels Nov 20, 2024
@krystxf krystxf self-assigned this Nov 20, 2024
Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
metro-now ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 6:03pm

) {}

async syncDataToRedis(dataURL: string) {
const response = await fetch(dataURL);

Check failure

Code scanning / CodeQL

Download of sensitive file through insecure connection High

Download
of sensitive file from
HTTP source
.

Copilot Autofix AI about 2 months ago

To fix the problem, we need to ensure that the file is downloaded over a secure connection using HTTPS instead of HTTP. This involves changing the URL in the getPrague method to use HTTPS.

  • Change the URL in the getPrague method from http://data.pid.cz/PID_GTFS.zip to https://data.pid.cz/PID_GTFS.zip.
  • Ensure that the rest of the code remains unchanged to maintain existing functionality.
Suggested changeset 1
apps/backend/src/modules/stop/stop.controller.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/backend/src/modules/stop/stop.controller.ts b/apps/backend/src/modules/stop/stop.controller.ts
--- a/apps/backend/src/modules/stop/stop.controller.ts
+++ b/apps/backend/src/modules/stop/stop.controller.ts
@@ -196,3 +196,3 @@
         console.log("Prague: Getting data");
-        const dataURL = "http://data.pid.cz/PID_GTFS.zip";
+        const dataURL = "https://data.pid.cz/PID_GTFS.zip";
 
EOF
@@ -196,3 +196,3 @@
console.log("Prague: Getting data");
const dataURL = "http://data.pid.cz/PID_GTFS.zip";
const dataURL = "https://data.pid.cz/PID_GTFS.zip";

Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant