Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serhii milestone 2 fix #56

Merged
merged 21 commits into from
Oct 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions linguaphoto/api/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from linguaphoto.crud.image import ImageCrud
from linguaphoto.models import Image
from linguaphoto.schemas.image import ImageTranslateFragment
from linguaphoto.socket_manager import notify_user
from linguaphoto.utils.auth import get_current_user_id, subscription_validate

router = APIRouter()
Expand All @@ -21,8 +20,6 @@ async def translate_background(image_id: str, image_crud: ImageCrud, user_id: st
translating_images.append(image_id)
image = await image_crud.translate(image_id, user_id)
translating_images.remove(image_id)
if image:
await notify_user(user_id, image.model_dump()) # Use await here


@router.post("/upload", response_model=Image)
Expand Down
Loading