delete timesheets via api (#776)

This commit is contained in:
Kevin Papst
2019-05-12 03:26:31 +02:00
committed by GitHub
parent e29e183e84
commit 5c227888f2
8 changed files with 34 additions and 169 deletions

View File

@@ -401,9 +401,7 @@ class TimesheetController extends BaseApiController
throw $this->createAccessDeniedException('You are not allowed to delete this timesheet');
}
$entityManager = $this->getDoctrine()->getManager();
$entityManager->remove($timesheet);
$entityManager->flush();
$this->repository->delete($timesheet);
$view = new View(null, Response::HTTP_NO_CONTENT);