Initial commit: VoIdeaAI - voice-first AI idea assistant

This commit is contained in:
2026-05-13 12:51:42 +03:00
commit 688d043dad
421 changed files with 47915 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
"""Sync API routes for VoIdea."""
from typing import Annotated
from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.core.dependencies import get_current_user, get_db
from app.models.user import User
from app.schemas.sync import SyncPullRequest, SyncPushRequest, SyncResponse
from app.services.sync_service import SyncService
router = APIRouter()
@router.post("/pull", response_model=SyncResponse)
async def pull(
body: SyncPullRequest,
user: Annotated[User, Depends(get_current_user)],
db: AsyncSession = Depends(get_db),
):
service = SyncService(db)
return await service.pull(user, last_sync=body.last_sync)
@router.post("/push", response_model=SyncResponse)
async def push(
body: SyncPushRequest,
user: Annotated[User, Depends(get_current_user)],
db: AsyncSession = Depends(get_db),
):
service = SyncService(db)
return await service.push(user, device_id=body.device_id, changes=body.changes)