Files
Back_modulo_comercial/Back_comercial_iko/app/comercial/Main_comercial.py

16 lines
618 B
Python

from fastapi import APIRouter
from Back_comercial_iko.services.Comercial_service import ComercialService
from Back_comercial_iko.core.Response import ApiResponse
from Back_comercial_iko.core.HttpStatus import HttpStatus
router = APIRouter(prefix="/comercial", tags=["Comercial"])
@router.post("/create-project")
def create_project(data: dict):
try:
service = ComercialService()
result = service.create_project_commercial(data)
return ApiResponse.success(result,"Proyecto creado",HttpStatus.CREATED)
except Exception as e:
return ApiResponse.error(str(e),HttpStatus.NOT_FOUND)