Snapshot of in-progress work across local_backend, manager_dashboard, and waiter_pwa (pricing, chat, fiscal, prep zones, recovery codes, CRM, inventory, permissions), plus the nginx/docker-compose deploy fixes for the Unraid + NPM reverse-proxy setup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
708 B
Python
26 lines
708 B
Python
from fastapi import APIRouter, Depends
|
|
from pydantic import BaseModel
|
|
from sqlalchemy.orm import Session
|
|
|
|
from database import get_db
|
|
from routers.deps import require_settings_manager
|
|
from models.user import User
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
class TestFoldersRequest(BaseModel):
|
|
out_folder: str
|
|
in_folder: str
|
|
|
|
|
|
@router.post("/test-folders")
|
|
def test_folders(
|
|
body: TestFoldersRequest,
|
|
db: Session = Depends(get_db),
|
|
user: User = Depends(require_settings_manager),
|
|
):
|
|
"""Verify that both fiscal folders are accessible (read + write) from inside the container."""
|
|
from services.fiscal_service import test_folders
|
|
return test_folders(body.out_folder.strip(), body.in_folder.strip())
|