Example #1
0
 /**
  * @param QChartsSubjectInterface $user
  * @param QueryRequest $queryRequest
  * @throws DatabaseException
  */
 public function removeFavourite(QChartsSubjectInterface $user, QueryRequest $queryRequest)
 {
     try {
         $queryRequest->removeFavoritedBy($user);
         $this->queryRepository->update($queryRequest);
     } catch (\Exception $e) {
         throw new DatabaseException("Error while attempting to remove the favorite, {$e->getMessage()}", $e->getCode(), $e);
     }
 }