Enhanced tests and changed route

This commit is contained in:
Nicolas Lœuillet
2020-04-26 14:09:16 +02:00
committed by Jeremy Benoist
parent 0aeaf0e8c2
commit 6dfc031839
8 changed files with 18 additions and 18 deletions

View File

@ -282,13 +282,13 @@ class EntryController extends Controller
*
* @param int $page
*
* @Route("/with_annotations/list/{page}", name="with_annotations", defaults={"page" = "1"})
* @Route("/annotated/list/{page}", name="annotated", defaults={"page" = "1"})
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showWithAnnotationsEntriesAction(Request $request, $page)
{
return $this->showEntries('with_annotations', $request, $page);
return $this->showEntries('annotated', $request, $page);
}
/**
@ -296,7 +296,7 @@ class EntryController extends Controller
*
* @param string $type
*
* @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|with_annotations|all"})
* @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|annotated|all"})
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
@ -577,7 +577,7 @@ class EntryController extends Controller
$qb = $repository->getBuilderForArchiveByUser($this->getUser()->getId());
$formOptions['filter_archived'] = true;
break;
case 'with_annotations':
case 'annotated':
$qb = $repository->getBuilderForAnnotationsByUser($this->getUser()->getId());
break;
case 'unread':

View File

@ -47,7 +47,7 @@ class ExportController extends Controller
*
* @Route("/export/{category}.{format}", name="export_entries", requirements={
* "format": "epub|mobi|pdf|json|xml|txt|csv",
* "category": "all|unread|starred|archive|tag_entries|untagged|search|with_annotations|same_domain"
* "category": "all|unread|starred|archive|tag_entries|untagged|search|annotated|same_domain"
* })
*
* @return \Symfony\Component\HttpFoundation\Response
@ -80,7 +80,7 @@ class ExportController extends Controller
->getResult();
$title = 'Search ' . $searchTerm;
} elseif ('with_annotations' === $category) {
} elseif ('annotated' === $category) {
$entries = $repository->getBuilderForAnnotationsByUser(
$this->getUser()->getId()
)->getQuery()