fix: Switch to route based urls (fix #4467)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
return [
|
||||
'routes' => [
|
||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||
['name' => 'page#indexList', 'url' => '/board', 'verb' => 'GET'],
|
||||
['name' => 'page#indexBoard', 'url' => '/board/{boardId}', 'verb' => 'GET'],
|
||||
['name' => 'page#indexBoardDetails', 'url' => '/board/{boardId}/details', 'verb' => 'GET'],
|
||||
['name' => 'page#indexCard', 'url' => '/board/{boardId}/card/{cardId}', 'verb' => 'GET'],
|
||||
|
||||
['name' => 'page#redirectToCard', 'url' => '/card/{cardId}', 'verb' => 'GET'],
|
||||
|
||||
// boards
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace OCA\Deck\Controller;
|
||||
|
||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||
use \OCP\AppFramework\Http\RedirectResponse;
|
||||
use OCA\Deck\AppInfo\Application;
|
||||
use OCA\Deck\Db\Acl;
|
||||
@@ -99,6 +101,30 @@ class PageController extends Controller {
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexList(): TemplateResponse {
|
||||
return $this->index();
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexBoard(int $boardId): TemplateResponse {
|
||||
return $this->index($boardId);
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexBoardDetails(int $boardId): TemplateResponse {
|
||||
return $this->index($boardId);
|
||||
}
|
||||
|
||||
#[NoAdminRequired]
|
||||
#[NoCSRFRequired]
|
||||
public function indexCard(int $cardId): TemplateResponse {
|
||||
return $this->index(cardId: $cardId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
|
||||
@@ -34,6 +34,7 @@ import Overview from './components/overview/Overview.vue'
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
mode: 'history',
|
||||
base: generateUrl('/apps/deck/'),
|
||||
linkActiveClass: 'active',
|
||||
routes: [
|
||||
|
||||
Reference in New Issue
Block a user