Skip to content
Merged
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
12 changes: 7 additions & 5 deletions .github/workflows/azure-static-web-apps-witty-bay-0a34d3100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WITTY_BAY_0A34D3100 }}
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
env:
VITE_API_BASE_URL: https://trackmint-api-chirag-ejakfzdadqhmfrhv.southindia-01.azurewebsites.net/api
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WITTY_BAY_0A34D3100 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/features/reports/ReportsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export function ReportsPage() {
if (params.categoryId) search.set("categoryId", params.categoryId);
if (params.type) search.set("type", params.type);

const response = await fetch(`${import.meta.env.VITE_API_BASE_URL ?? "http://localhost:5151/api"}/reports/export/csv?${search.toString()}`, {
const configuredApiBaseUrl = import.meta.env.VITE_API_BASE_URL?.trim();
const apiBaseUrl = configuredApiBaseUrl && configuredApiBaseUrl.length > 0 ? configuredApiBaseUrl : "http://localhost:5151/api";
const response = await fetch(`${apiBaseUrl}/reports/export/csv?${search.toString()}`, {
headers: {
Authorization: `Bearer ${session?.accessToken ?? ""}`,
},
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/services/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import axios from "axios";
import type { AuthResponse } from "../../types/models";
import { getAuthSession, useAuthStore } from "../../store/auth-store";

const baseURL = import.meta.env.VITE_API_BASE_URL ?? "http://localhost:5151/api";
const configuredApiBaseUrl = import.meta.env.VITE_API_BASE_URL?.trim();
const baseURL = configuredApiBaseUrl && configuredApiBaseUrl.length > 0 ? configuredApiBaseUrl : "http://localhost:5151/api";

export const api = axios.create({
baseURL,
Expand Down
Loading