Fix #4: Remove duplicate step_out and import in steps.py
Some checks failed
Deploy Tracker / deploy (push) Failing after 4s
Some checks failed
Deploy Tracker / deploy (push) Failing after 4s
This commit is contained in:
parent
b67587b647
commit
05b56dbdae
@ -10,25 +10,8 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
|||||||
from ..database import get_db
|
from ..database import get_db
|
||||||
from ..models import Step, Task
|
from ..models import Step, Task
|
||||||
from .schemas import StepOut
|
from .schemas import StepOut
|
||||||
from .schemas import StepOut
|
|
||||||
from .converters import step_out
|
from .converters import step_out
|
||||||
|
|
||||||
router = APIRouter(tags=["steps"])
|
|
||||||
|
|
||||||
|
|
||||||
# --- Helpers ---
|
|
||||||
|
|
||||||
def step_out(s: Step) -> StepOut:
|
|
||||||
"""Convert Step to StepOut schema."""
|
|
||||||
return StepOut(
|
|
||||||
id=str(s.id),
|
|
||||||
task_id=str(s.task_id),
|
|
||||||
title=s.title,
|
|
||||||
done=s.done,
|
|
||||||
position=s.position,
|
|
||||||
created_at=s.created_at.isoformat() if s.created_at else ""
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class StepCreate(BaseModel):
|
class StepCreate(BaseModel):
|
||||||
title: str
|
title: str
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user