mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Merge branch 'release-0.11.0' of https://github.com/blakeblackshear/frigate into favorite-delete-protection
This commit is contained in:
commit
dcec19358e
@ -23,6 +23,7 @@ services:
|
|||||||
- /dev/bus/usb:/dev/bus/usb
|
- /dev/bus/usb:/dev/bus/usb
|
||||||
ports:
|
ports:
|
||||||
- "1935:1935"
|
- "1935:1935"
|
||||||
|
- "3000:3000"
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
- "5001:5001"
|
- "5001:5001"
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { rest } from 'msw';
|
|||||||
import { API_HOST } from '../src/env';
|
import { API_HOST } from '../src/env';
|
||||||
|
|
||||||
export const handlers = [
|
export const handlers = [
|
||||||
rest.get(`${API_HOST}/api/config`, (req, res, ctx) => {
|
rest.get(`${API_HOST}api/config`, (req, res, ctx) => {
|
||||||
return res(
|
return res(
|
||||||
ctx.status(200),
|
ctx.status(200),
|
||||||
ctx.json({
|
ctx.json({
|
||||||
@ -35,7 +35,7 @@ export const handlers = [
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rest.get(`${API_HOST}/api/stats`, (req, res, ctx) => {
|
rest.get(`${API_HOST}api/stats`, (req, res, ctx) => {
|
||||||
return res(
|
return res(
|
||||||
ctx.status(200),
|
ctx.status(200),
|
||||||
ctx.json({
|
ctx.json({
|
||||||
@ -54,7 +54,7 @@ export const handlers = [
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rest.get(`${API_HOST}/api/events`, (req, res, ctx) => {
|
rest.get(`${API_HOST}api/events`, (req, res, ctx) => {
|
||||||
return res(
|
return res(
|
||||||
ctx.status(200),
|
ctx.status(200),
|
||||||
ctx.json(
|
ctx.json(
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite --host",
|
||||||
"lint": "eslint ./ --ext .jsx,.js,.tsx,.ts",
|
"lint": "eslint ./ --ext .jsx,.js,.tsx,.ts",
|
||||||
"build": "tsc && vite build --base=/BASE_PATH/",
|
"build": "tsc && vite build --base=/BASE_PATH/",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
export const ENV = 'test';
|
export const ENV = 'test';
|
||||||
export const API_HOST = 'http://base-url.local:5000';
|
export const API_HOST = 'http://base-url.local:5000/';
|
||||||
|
|||||||
@ -18,6 +18,6 @@ describe('useApiHost', () => {
|
|||||||
<Test />
|
<Test />
|
||||||
</ApiProvider>
|
</ApiProvider>
|
||||||
);
|
);
|
||||||
expect(screen.queryByText('http://base-url.local:5000')).toBeInTheDocument();
|
expect(screen.queryByText('http://base-url.local:5000/')).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
export const ENV = import.meta.env.MODE;
|
export const ENV = import.meta.env.MODE;
|
||||||
export const API_HOST = ENV === "production" ? "" : "http://localhost:5000";
|
export const API_HOST = ENV === 'production' ? '' : 'http://localhost:5000/';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user