Amitkasar commited on
Commit
e2728d4
·
1 Parent(s): c1f101d

Fix trailing slash double-slash API call issue

Browse files
Files changed (1) hide show
  1. frontend-react/src/services/api.js +1 -1
frontend-react/src/services/api.js CHANGED
@@ -1,6 +1,6 @@
1
  import axios from 'axios';
2
 
3
- const BACKEND_URL = import.meta.env.VITE_BACKEND_URL || 'http://localhost:8001';
4
  const API_BASE = `${BACKEND_URL}/api/v1`;
5
  const SESSION_KEY = '_jwt';
6
 
 
1
  import axios from 'axios';
2
 
3
+ const BACKEND_URL = (import.meta.env.VITE_BACKEND_URL || 'http://localhost:8001').replace(/\/+$/, '');
4
  const API_BASE = `${BACKEND_URL}/api/v1`;
5
  const SESSION_KEY = '_jwt';
6