PhoenixKitKnowledgeBase.Routes (PhoenixKitKnowledgeBase v0.1.0)

Copy Markdown View Source

Route macros for the knowledge base's four admin pages. Returned from PhoenixKitKnowledgeBase.route_module/0; PhoenixKit injects these inside the admin live_session, so authentication and the admin layout are applied automatically.

Both localized (/:locale/admin/...) and non-localized sets are defined, as required — and each route needs a unique :as, hence the _localized suffixes.

Ordering matters in one place: notes/new is declared before notes/:id, or the :id pattern claims the literal "new" and creating a note 404s looking for a note with that uuid.

Summary

Functions

Localized admin routes (inside the /:locale scope).

Non-localized admin routes.

Functions

admin_locale_routes()

Localized admin routes (inside the /:locale scope).

admin_routes()

Non-localized admin routes.