Nuevos cambios para config del repo y creacion del servicio de creacion comercial
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user