Skip to content

Commit

Permalink
fix: add "s" to http URL for debugging in production environment
Browse files Browse the repository at this point in the history
- Added "s" to `http://bcfcode.ir` in the `baseURL` to test and debug the production environment (changing it to `https://bcfcode.ir`).
- Updated the `fetchCompletedChallenges` function to include the `cache: "no-store"` option in the fetch request, ensuring that the data is always freshly fetched from the server.
- This change is part of debugging efforts to resolve potential HTTPS-related issues with the API requests.

Note: The modification to `baseURL` is temporary for debugging purposes. Will revert once the issue is resolved.
  • Loading branch information
BCFCODE committed Dec 17, 2024
1 parent daf7cd9 commit 88caf06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/(dashboard)/leaderboard/(Table)/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function fetchAndCreateRows() {
export async function fetchCompletedChallenges() {
try {
// Fetch the data from your API
const response = await fetch(`${baseURL}/api/users`);
const response = await fetch(`${baseURL}/api/users`, { cache: "no-store" });
if (!response.ok) {
throw new Error("Failed to fetch users");
}
Expand Down

0 comments on commit 88caf06

Please sign in to comment.