mirror of
https://github.com/ferdzo/iotDashboard.git
synced 2026-04-05 17:16:26 +00:00
Add Dockerfile and .dockerignore; refactor import paths in app modules
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from db_models import Device, DeviceCertificate # SQLAlchemy ORM models
|
||||
from fastapi import FastAPI, HTTPException
|
||||
|
||||
from cert_manager import CertificateManager
|
||||
from database import get_db_context
|
||||
from models import DeviceRegistrationRequest, DeviceRegistrationResponse, DeviceResponse
|
||||
from app.cert_manager import CertificateManager
|
||||
from app.database import get_db_context
|
||||
from app.db_models import Device, DeviceCertificate # SQLAlchemy ORM models
|
||||
from app.models import DeviceRegistrationRequest, DeviceRegistrationResponse, DeviceResponse
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from cryptography.x509.oid import NameOID
|
||||
from nanoid import generate
|
||||
|
||||
from config import config
|
||||
from models import DeviceRegistrationResponse
|
||||
from app.config import config
|
||||
from app.models import DeviceRegistrationResponse
|
||||
|
||||
lowercase_numbers = "abcdefghijklmnopqrstuvwxyz0123456789"
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from contextlib import contextmanager
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import Session, sessionmaker
|
||||
|
||||
from config import config
|
||||
from app.config import config
|
||||
|
||||
# Create engine with connection pooling
|
||||
engine = create_engine(
|
||||
|
||||
@@ -2,6 +2,7 @@ import datetime
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class DeviceRegistrationRequest(BaseModel):
|
||||
"""Request model for registering a new device."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user