Fix generated fronted urls

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-05-19 09:24:25 +02:00
parent 30683fd994
commit 6910ba95fa
6 changed files with 11 additions and 11 deletions

View File

@@ -357,6 +357,6 @@ class DeckProvider implements IProvider {
}
public function deckUrl($endpoint) {
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . '#!' . $endpoint;
return $this->urlGenerator->linkToRouteAbsolute('deck.page.index') . '#' . $endpoint;
}
}

View File

@@ -70,7 +70,7 @@ class ResourceProvider implements IProvider {
*/
public function getResourceRichObject(IResource $resource): array {
$board = $this->getBoard($resource);
$link = \OC::$server->getURLGenerator()->linkToRoute('deck.page.index') . '#!/board/' . $resource->getId();
$link = \OC::$server->getURLGenerator()->linkToRoute('deck.page.index') . '#/board/' . $resource->getId();
return [
'type' => self::RESOURCE_TYPE,

View File

@@ -90,7 +90,7 @@ class ResourceProviderCard implements IProvider {
throw new ResourceException('No unique card found for resource, this should never happen');
}
$link = $this->urlGenerator->linkToRoute('deck.page.index') . '#/board/' . $board->getId() . '/cards/' . $resource->getId();
$link = $this->urlGenerator->linkToRoute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $resource->getId();
return [
'type' => self::RESOURCE_TYPE,

View File

@@ -115,7 +115,7 @@ class Notifier implements INotifier {
]
]
);
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#!/board/' . $boardId . '/card/' . $cardId . '');
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#/board/' . $boardId . '/card/' . $cardId . '');
break;
case 'card-overdue':
$cardId = $notification->getObjectId();
@@ -123,7 +123,7 @@ class Notifier implements INotifier {
$notification->setParsedSubject(
(string) $l->t('The card "%s" on "%s" has reached its due date.', $params)
);
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#!/board/' . $boardId . '/card/' . $cardId . '');
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#/board/' . $boardId . '/card/' . $cardId . '');
break;
case 'card-comment-mentioned':
$cardId = $notification->getObjectId();
@@ -150,7 +150,7 @@ class Notifier implements INotifier {
if ($notification->getMessage() === '{message}') {
$notification->setParsedMessage($notification->getMessageParameters()['message']);
}
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#!/board/' . $boardId . '/card/' . $cardId . '');
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#/board/' . $boardId . '/card/' . $cardId . '');
break;
case 'board-shared':
$boardId = $notification->getObjectId();
@@ -173,7 +173,7 @@ class Notifier implements INotifier {
]
]
);
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#!/board/' . $boardId . '/');
$notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#/board/' . $boardId . '/');
break;
}
return $notification;

View File

@@ -253,7 +253,7 @@ class DeckProvider implements IFullTextSearchProvider {
try {
$board =
$this->fullTextSearchService->getBoardFromCardId((int)$document->getId());
$path = '#!/board/' . $board->getId() . '//card/' . $document->getId();
$path = '#/board/' . $board->getId() . '/card/' . $document->getId();
$document->setLink($this->urlGenerator->linkToRoute('deck.page.index') . $path);
} catch (DoesNotExistException $e) {
} catch (MultipleObjectsReturnedException $e) {