Brushed up the backend, added writing task 1 academic prompt gen and grading ENCOA-274
This commit is contained in:
21
ielts_be/api/user.py
Normal file
21
ielts_be/api/user.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from dependency_injector.wiring import Provide, inject
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from ielts_be.dtos.user_batch import BatchUsersDTO
|
||||
from ielts_be.middlewares import Authorized, IsAuthenticatedViaBearerToken
|
||||
from ielts_be.controllers import IUserController
|
||||
|
||||
controller = "user_controller"
|
||||
user_router = APIRouter()
|
||||
|
||||
|
||||
@user_router.post(
|
||||
'/import',
|
||||
dependencies=[Depends(Authorized([IsAuthenticatedViaBearerToken]))]
|
||||
)
|
||||
@inject
|
||||
async def batch_import(
|
||||
batch: BatchUsersDTO,
|
||||
user_controller: IUserController = Depends(Provide[controller])
|
||||
):
|
||||
return await user_controller.batch_import(batch)
|
||||
Reference in New Issue
Block a user