Update db.py

This commit is contained in:
Santiago Lo Coco 2024-10-25 22:09:10 +02:00
parent d7d7826788
commit 4f0c990601
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
from flask_sqlalchemy import SQLAlchemy
from config import API_HOST
db = SQLAlchemy()
@ -19,8 +21,8 @@ def init_default_endpoints():
existing_endpoints = {endpoint.id for endpoint in Endpoint.query.all()}
default_endpoints = [
Endpoint(id=1, url="http://windows.local:8100/mystream/"),
Endpoint(id=2, url="http://windows.local:8200/mystream/"),
Endpoint(id=1, url=f"http://{API_HOST}:8100/mystream/"),
Endpoint(id=2, url=f"http://{API_HOST}:8200/mystream/"),
]
updated = False