mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 21:44:13 +03:00
use base path when fetching go2rtc data
This commit is contained in:
parent
376e5b5c25
commit
70e5ce5771
@ -1,3 +1,4 @@
|
||||
import { baseUrl } from "@/api/baseUrl";
|
||||
import { CameraConfig, FrigateConfig } from "@/types/frigateConfig";
|
||||
import { useCallback, useEffect, useState, useMemo } from "react";
|
||||
import useSWR from "swr";
|
||||
@ -41,9 +42,12 @@ export default function useCameraLiveMode(
|
||||
|
||||
const metadataPromises = streamNames.map(async (streamName) => {
|
||||
try {
|
||||
const response = await fetch(`/api/go2rtc/streams/${streamName}`, {
|
||||
priority: "low",
|
||||
});
|
||||
const response = await fetch(
|
||||
`${baseUrl}api/go2rtc/streams/${streamName}`,
|
||||
{
|
||||
priority: "low",
|
||||
},
|
||||
);
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { baseUrl } from "@/api/baseUrl";
|
||||
import { generateFixedHash, isValidId } from "./stringUtil";
|
||||
|
||||
/**
|
||||
@ -52,9 +53,12 @@ export async function detectReolinkCamera(
|
||||
password,
|
||||
});
|
||||
|
||||
const response = await fetch(`/api/reolink/detect?${params.toString()}`, {
|
||||
method: "GET",
|
||||
});
|
||||
const response = await fetch(
|
||||
`${baseUrl}api/reolink/detect?${params.toString()}`,
|
||||
{
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
return null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user