alexander1010 commited on
Commit
84b9e0c
·
verified ·
1 Parent(s): 519f330

feat: update presentation controller

Browse files
src/expon/presentation/interfaces/rest/controllers/presentation_controller.py CHANGED
@@ -127,8 +127,6 @@ def delete_presentation(
127
  current_user=Depends(get_current_user)
128
  ):
129
  repository = PresentationRepository(db)
130
- feedback_repo = FeedbackRepository(db)
131
-
132
  presentation = repository.get_by_id_and_user(presentation_id, current_user.id)
133
 
134
  if presentation is None:
@@ -138,14 +136,10 @@ def delete_presentation(
138
  storage_service = LocalStorageService()
139
  storage_service.delete(presentation.filename)
140
 
141
- # Eliminar feedbacks asociados
142
- feedback_repo.delete_by_presentation(presentation_id)
143
-
144
  # Eliminar de base de datos
145
  repository.delete(presentation)
146
 
147
 
148
-
149
  @router.get("/feedback/presentation/{presentation_id}", response_model=FeedbackResponse)
150
  def get_feedback_by_presentation(
151
  presentation_id: UUID,
@@ -158,3 +152,4 @@ def get_feedback_by_presentation(
158
  raise HTTPException(status_code=404, detail="Feedback no encontrado")
159
 
160
  return feedback
 
 
127
  current_user=Depends(get_current_user)
128
  ):
129
  repository = PresentationRepository(db)
 
 
130
  presentation = repository.get_by_id_and_user(presentation_id, current_user.id)
131
 
132
  if presentation is None:
 
136
  storage_service = LocalStorageService()
137
  storage_service.delete(presentation.filename)
138
 
 
 
 
139
  # Eliminar de base de datos
140
  repository.delete(presentation)
141
 
142
 
 
143
  @router.get("/feedback/presentation/{presentation_id}", response_model=FeedbackResponse)
144
  def get_feedback_by_presentation(
145
  presentation_id: UUID,
 
152
  raise HTTPException(status_code=404, detail="Feedback no encontrado")
153
 
154
  return feedback
155
+