Skip to content
Snippets Groups Projects
Verified Commit 6f586f6b authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix URL patterns to follow URL scheme

parent 6fc20bd3
No related branches found
No related tags found
1 merge request!1695Fix URL patterns to follow URL scheme
Pipeline #195128 passed
......@@ -76,7 +76,7 @@ const routes = [
},
},
{
path: "/calendar",
path: "/calendar/",
component: () => import("./components/calendar/CalendarOverview.vue"),
name: "core.calendar_overview",
meta: {
......@@ -101,7 +101,7 @@ const routes = [
],
},
{
path: "/people",
path: "people",
name: "core.people",
component: () => import("./components/Parent.vue"),
meta: {
......@@ -113,7 +113,7 @@ const routes = [
},
children: [
{
path: "/persons",
path: "/person/",
component: () => import("./components/person/PersonList.vue"),
name: "core.persons",
meta: {
......@@ -125,7 +125,7 @@ const routes = [
},
},
{
path: "/persons/create/",
path: "/person/create/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -133,7 +133,7 @@ const routes = [
name: "core.createPerson",
},
{
path: "/persons/:id(\\d+)/",
path: "/person/:id(\\d+)",
component: () => import("./components/person/PersonOverview.vue"),
name: "core.personById",
props: true,
......@@ -142,7 +142,7 @@ const routes = [
},
},
{
path: "/persons/:id(\\d+)/edit/",
path: "/person/:id(\\d+)/edit/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -150,7 +150,7 @@ const routes = [
name: "core.editPerson",
},
{
path: "/persons/:id(\\d+)/invite/",
path: "/person/:id(\\d+)/invite/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -158,7 +158,7 @@ const routes = [
name: "core.invitePerson",
},
{
path: "/persons/:id(\\d+)/:widgetSlug([^\\s!?\\/*#|]+)",
path: "/person/:id(\\d+)/:widgetSlug([^\\s!?\\/*#|]+)",
component: () => import("./components/person/PersonOverview.vue"),
props: true,
name: "core.personByIdWithSlug",
......@@ -167,7 +167,7 @@ const routes = [
},
},
{
path: "/groups",
path: "/group/",
component: () => import("./components/group/GroupList.vue"),
name: "core.groups",
meta: {
......@@ -179,7 +179,7 @@ const routes = [
},
},
{
path: "/groups/create",
path: "/group/create",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -187,7 +187,7 @@ const routes = [
name: "core.createGroup",
},
{
path: "/groups/:id(\\d+)",
path: "/group/:id(\\d+)",
component: () => import("./components/group/GroupOverview.vue"),
props: true,
name: "core.group",
......@@ -213,7 +213,7 @@ const routes = [
},
},
{
path: "/groups/group_types",
path: "/group_type/",
component: () => import("./components/group_type/GroupType.vue"),
name: "core.groupTypes",
meta: {
......@@ -247,7 +247,7 @@ const routes = [
},
children: [
{
path: "/rooms/",
path: "/room/",
component: () => import("./components/room/RoomInlineList.vue"),
name: "core.rooms",
meta: {
......@@ -259,7 +259,7 @@ const routes = [
},
},
{
path: "/announcements/",
path: "/announcement/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -274,7 +274,7 @@ const routes = [
},
},
{
path: "/announcements/create/",
path: "/announcement/create/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -282,7 +282,7 @@ const routes = [
name: "core.addAnnouncement",
},
{
path: "/announcements/edit/:id(\\d+)/",
path: "/announcement/edit/:id(\\d+)/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -290,7 +290,7 @@ const routes = [
name: "core.editAnnouncement",
},
{
path: "/announcements/delete/:id(\\d+)/",
path: "/announcement/delete/:id(\\d+)/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -298,7 +298,7 @@ const routes = [
name: "core.deleteAnnouncement",
},
{
path: "/holidays/",
path: "/holiday/",
component: () => import("./components/holiday/HolidayInlineList.vue"),
name: "core.holidays",
meta: {
......@@ -310,7 +310,7 @@ const routes = [
},
},
{
path: "/school_terms/",
path: "/school_term/",
component: () =>
import("./components/school_term/SchoolTermInlineList.vue"),
name: "core.school_terms",
......@@ -336,7 +336,7 @@ const routes = [
},
children: [
{
path: "/dashboard_widgets/",
path: "/dashboard_widget/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -351,7 +351,7 @@ const routes = [
},
},
{
path: "/dashboard_widgets/:pk(\\d+)/edit/",
path: "/dashboard_widget/:pk(\\d+)/edit/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -359,7 +359,7 @@ const routes = [
name: "core.editDashboardWidget",
},
{
path: "/dashboard_widgets/:pk(\\d+)/delete/",
path: "/dashboard_widget/:pk(\\d+)/delete/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -367,7 +367,7 @@ const routes = [
name: "core.deleteDashboardWidget",
},
{
path: "/dashboard_widgets/:app/:model/new/",
path: "/dashboard_widget/:app/:model/new/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -375,7 +375,7 @@ const routes = [
name: "core.createDashboardWidget",
},
{
path: "/dashboard_widgets/default/",
path: "/dashboard_widget/default/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -419,7 +419,7 @@ const routes = [
name: "core.preferencesSiteSection",
},
{
path: "/data_checks/",
path: "/data_check/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -433,7 +433,7 @@ const routes = [
},
},
{
path: "/data_checks/run/",
path: "/data_check/run/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -441,7 +441,7 @@ const routes = [
name: "core.runDataChecks",
},
{
path: "/data_checks/:pk(\\d+)/:solve_option/",
path: "/data_check/:pk(\\d+)/:solve_option/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -538,7 +538,7 @@ const routes = [
},
{
path: "/oauth/applications/",
path: "/oauth/application/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -552,7 +552,7 @@ const routes = [
},
},
{
path: "/oauth/applications/register/",
path: "/oauth/application/register/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -560,7 +560,7 @@ const routes = [
name: "core.registerOauthApplication,",
},
{
path: "/oauth/applications/:pk(\\d+)/",
path: "/oauth/application/:pk(\\d+)",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -568,7 +568,7 @@ const routes = [
name: "core.oauthApplication",
},
{
path: "/oauth/applications/:pk(\\d+)/delete/",
path: "/oauth/application/:pk(\\d+)/delete/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -576,7 +576,7 @@ const routes = [
name: "core.delete_oauth2_application,",
},
{
path: "/oauth/applications/:pk(\\d+)/edit/",
path: "/oauth/application/:pk(\\d+)/edit/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -627,7 +627,7 @@ const routes = [
},
},
{
path: "/person/",
path: "/person",
component: () => import("./components/person/PersonOverview.vue"),
name: "core.person",
meta: {
......@@ -638,15 +638,6 @@ const routes = [
permission: "core.view_account_rule",
},
},
{
path: "/person/:widgetSlug([^\\s!?\\/*#|]+)/",
component: () => import("./components/person/PersonOverview.vue"),
props: true,
name: "core.personWithSlug",
meta: {
permission: "core.view_account_rule",
},
},
{
path: "/preferences/person/",
component: () => import("./components/LegacyBaseTemplate.vue"),
......@@ -886,7 +877,7 @@ const routes = [
name: "core.accounts.deleteSocialConnection",
},
{
path: "/oauth/authorized_tokens/",
path: "/oauth/authorized_token/",
component: () =>
import(
"./components/authorized_oauth_applications/AuthorizedApplications.vue"
......@@ -901,7 +892,7 @@ const routes = [
},
},
{
path: "/oauth/authorized_tokens/:pk(\\d+)/delete/",
path: "/oauth/authorized_token/:pk(\\d+)/delete/",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -925,7 +916,7 @@ const routes = [
},
},
{
path: "/invitations/code/generate",
path: "/invitation/code/generate",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -933,7 +924,7 @@ const routes = [
name: "core.generate_invitation_code",
},
{
path: "/invitations/disabled",
path: "/invitation/disabled",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......@@ -989,7 +980,7 @@ const routes = [
name: "core.testPdf",
},
{
path: "/pdfs/:id",
path: "/pdf/:id",
component: () => import("./components/pdf/DownloadPDF.vue"),
name: "core.redirectToPdfUrl",
},
......@@ -1016,7 +1007,7 @@ const routes = [
},
},
{
path: "/invitations/accept-invite/:code",
path: "/invitation/accept-invite/:code",
component: () => import("./components/LegacyBaseTemplate.vue"),
props: {
byTheGreatnessOfTheAlmightyAleksolotlISwearIAmWorthyOfUsingTheLegacyBaseTemplate: true,
......
......@@ -39,25 +39,25 @@ urlpatterns = [
ConnectDiscoveryInfoView.as_view(),
name="oidc_configuration",
),
path("oauth/applications/", views.TemplateView.as_view(template_name="core/vue_index.html")),
path("oauth/application/", views.TemplateView.as_view(template_name="core/vue_index.html")),
path(
"oauth/applications/register/",
"oauth/application/register/",
views.TemplateView.as_view(template_name="core/vue_index.html"),
),
path(
"oauth/applications/<int:pk>/",
"oauth/application/<int:pk>/",
views.TemplateView.as_view(template_name="core/vue_index.html"),
),
path(
"oauth/applications/<int:pk>/delete/",
"oauth/application/<int:pk>/delete/",
views.TemplateView.as_view(template_name="core/vue_index.html"),
),
path(
"oauth/applications/<int:pk>/edit/",
"oauth/application/<int:pk>/edit/",
views.TemplateView.as_view(template_name="core/vue_index.html"),
),
path(
"oauth/authorized_tokens/", views.TemplateView.as_view(template_name="core/vue_index.html")
"oauth/authorized_token/", views.TemplateView.as_view(template_name="core/vue_index.html")
),
path("oauth/", include("oauth2_provider.urls", namespace="oauth2_provider")),
path("system_status/", views.SystemStatusAPIView.as_view(), name="system_status_api"),
......@@ -103,25 +103,23 @@ urlpatterns = [
name="delete_social_account_by_pk",
),
path("offline/", views.OfflineView.as_view(), name="offline"),
path("invitation/send-invite/", views.InvitePerson.as_view(), name="invite_person"),
path(
"invitations/send-invite/", views.InvitePerson.as_view(), name="invite_person"
),
path(
"invitations/code/enter/",
"invitation/code/enter/",
views.EnterInvitationCode.as_view(),
name="enter_invitation_code",
),
path(
"invitations/code/generate/",
"invitation/code/generate/",
views.GenerateInvitationCode.as_view(),
name="generate_invitation_code",
),
path(
"invitations/disabled/",
"invitation/disabled/",
views.InviteDisabledView.as_view(),
name="invite_disabled",
),
path("invitations/", include("invitations.urls")),
path("invitation/", include("invitations.urls")),
path("status/", views.SystemStatus.as_view(), name="system_status"),
path("", include(tf_urls)),
path("account/login/", views.TwoFactorLoginView.as_view()),
......@@ -131,50 +129,50 @@ urlpatterns = [
name="setup_two_factor_auth",
),
path(
"persons/",
"person",
TemplateView.as_view(template_name="core/empty.html"),
name="persons",
),
path(
"person/", TemplateView.as_view(template_name="core/empty.html"), name="person"
),
path("persons/create/", views.CreatePersonView.as_view(), name="create_person"),
path("person/create/", views.CreatePersonView.as_view(), name="create_person"),
path(
"persons/<int:id_>/",
"person/<int:id_>",
TemplateView.as_view(template_name="core/empty.html"),
name="person_by_id",
),
path(
"persons/<int:pk>/edit/",
"person/<int:pk>/edit/",
views.EditPersonView.as_view(),
name="edit_person_by_id",
),
path(
"persons/<int:pk>/invite/",
"person/<int:pk>/invite/",
views.InvitePersonByID.as_view(),
name="invite_person_by_id",
),
path(
"groups/", TemplateView.as_view(template_name="core/empty.html"), name="groups"
"group/", TemplateView.as_view(template_name="core/empty.html"), name="groups"
),
path("groups/create/", views.edit_group, name="create_group"),
path("group/create/", views.edit_group, name="create_group"),
path(
"groups/<int:id_>/",
"group/<int:id_>",
TemplateView.as_view(template_name="core/empty.html"),
name="group_by_id",
),
path("groups/<int:id_>/edit/", views.edit_group, name="edit_group_by_id"),
path("group/<int:id_>/edit/", views.edit_group, name="edit_group_by_id"),
path("", views.index, name="index"),
path("dashboard/edit/", views.EditDashboardView.as_view(), name="edit_dashboard"),
path("announcements/", views.announcements, name="announcements"),
path("announcements/create/", views.announcement_form, name="add_announcement"),
path("announcement/", views.announcements, name="announcements"),
path("announcement/create/", views.announcement_form, name="add_announcement"),
path(
"announcements/edit/<int:id_>/",
"announcement/edit/<int:id_>",
views.announcement_form,
name="edit_announcement",
),
path(
"announcements/delete/<int:id_>/",
"announcement/delete/<int:id_>",
views.delete_announcement,
name="delete_announcement",
),
......@@ -183,17 +181,17 @@ urlpatterns = [
path("maintenance-mode/", include("maintenance_mode.urls")),
path("impersonate/", include("impersonate.urls")),
path(
"oauth/applications/",
"oauth/application/",
views.OAuth2ListView.as_view(),
name="oauth2_applications",
),
path(
"oauth/applications/register/",
"oauth/application/register/",
views.OAuth2RegisterView.as_view(),
name="register_oauth_application",
),
path(
"oauth/applications/<int:pk>/",
"oauth/application/<int:pk>",
views.OAuth2DetailView.as_view(),
name="oauth2_application",
),
......@@ -295,42 +293,42 @@ urlpatterns = [
path("health/pdf/", views.TestPDFGenerationView.as_view(), name="test_pdf"),
path("health/", include(health_urls)),
path(
"data_checks/",
"data_check/",
views.DataCheckView.as_view(),
name="check_data",
),
path(
"data_checks/run/",
"data_check/run/",
views.RunDataChecks.as_view(),
name="data_check_run",
),
path(
"data_checks/<int:pk>/<str:solve_option>/",
"data_check/<int:pk>/<str:solve_option>/",
views.SolveDataCheckView.as_view(),
name="data_check_solve",
),
path(
"dashboard_widgets/",
"dashboard_widget/",
views.DashboardWidgetListView.as_view(),
name="dashboard_widgets",
),
path(
"dashboard_widgets/<int:pk>/edit/",
"dashboard_widget/<int:pk>/edit/",
views.DashboardWidgetEditView.as_view(),
name="edit_dashboard_widget",
),
path(
"dashboard_widgets/<int:pk>/delete/",
"dashboard_widget/<int:pk>/delete/",
views.DashboardWidgetDeleteView.as_view(),
name="delete_dashboard_widget",
),
path(
"dashboard_widgets/<str:app>/<str:model>/new/",
"dashboard_widget/<str:app>/<str:model>/new/",
views.DashboardWidgetCreateView.as_view(),
name="create_dashboard_widget",
),
path(
"dashboard_widgets/default/",
"dashboard_widget/default/",
views.EditDashboardView.as_view(),
{"default": True},
name="edit_default_dashboard",
......@@ -385,7 +383,7 @@ urlpatterns = [
views.AssignPermissionView.as_view(),
name="assign_permission",
),
path("feeds/<str:name>.ics", views.ICalFeedView.as_view(), name="calendar_feed"),
path("feed/<str:name>.ics", views.ICalFeedView.as_view(), name="calendar_feed"),
path("feeds.ics", views.ICalAllFeedsView.as_view(), name="all_calendar_feeds"),
]
),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment