Nuevos cambios para config del repo y creacion del servicio de creacion comercial

This commit is contained in:
2026-03-20 10:52:34 -05:00
parent 006da6acba
commit 09552c0c23
7 changed files with 128 additions and 29 deletions

View File

@@ -3,6 +3,7 @@ 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
from Back_comercial_iko.core.AuthTokenDoli import TokenDoliManager
from Back_comercial_iko.core.ExceptionHandler import db_error_response
router = APIRouter(prefix="/comercial", tags=["Comercial"])
@@ -14,4 +15,4 @@ def create_project(data: dict, token_data: dict = Depends(TokenDoliManager.verif
result = service.create_project_commercial(data, token_data)
return ApiResponse.success(result, "Proyecto creado", HttpStatus.CREATED)
except Exception as e:
return ApiResponse.error(str(e), HttpStatus.NOT_FOUND)
return db_error_response(e)