feat: delete /api/v1/external_channels/import/

This commit is contained in:
Artem Tsyrulnikov
2025-11-11 23:15:50 +03:00
parent 552a3ddef2
commit 292bb0d49b
5 changed files with 1 additions and 82 deletions

View File

@@ -1,7 +1,7 @@
import uuid
from typing import Annotated
from fastapi import Depends, File, UploadFile
from fastapi import Depends
from fastapi.routing import APIRouter
from src import dependencies, dto
@@ -80,25 +80,3 @@ async def delete_external_channel(
)
await dependencies.get_usecase().delete_external_channel(input=input)
@external_channels_router.post('/import/{target_channel_id}')
async def import_external_channels(
target_channel_id: uuid.UUID,
current_user: Annotated[JWTPayload, Depends(dependencies.get_current_user)],
file: UploadFile = File(...),
) -> dto.ImportExternalChannelsOutput:
"""
Import external channels from Excel file (Tgstat export).
Note: This is a mock endpoint until Excel structure is clarified.
"""
file_content = await file.read()
input = dto.ImportExternalChannelsInput(
target_channel_id=target_channel_id,
user_id=current_user.user_id,
file_content=file_content,
)
return await dependencies.get_usecase().import_external_channels_from_excel(input=input)