Fix connection
This commit is contained in:
1 parent
4ad665cac0
commit
b8a847c210
12 files changed
+56
-18
No files matched your search
@@ -36,10 +36,10 @@ export default function ServiceView() {
|
||||
const fetchServiceAndLogs = async () => {
|
||||
try {
|
||||
const [svcRes, logsRes] = await Promise.all([
|
||||
fetch(`http://localhost:3001/api/services`, {
|
||||
fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3001'}/api/services`, {
|
||||
credentials: 'include'
|
||||
}),
|
||||
fetch(`http://localhost:3001/api/services/${id}/logs`, {
|
||||
fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3001'}/api/services/${id}/logs`, {
|
||||
credentials: 'include'
|
||||
})
|
||||
]);
|
||||
@@ -76,7 +76,7 @@ export default function ServiceView() {
|
||||
|
||||
const handleDelete = async () => {
|
||||
try {
|
||||
await fetch(`http://localhost:3001/api/services/${id}`, {
|
||||
await fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3001'}/api/services/${id}`, {
|
||||
method: 'DELETE',
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user