PhoenixKitAI.Routes (PhoenixKitAI v0.6.0)

Copy Markdown View Source

Route module for PhoenixKit AI admin routes.

Defines all admin LiveView routes for the AI module. Both admin_locale_routes/0 and admin_routes/0 define the same routes — one for localized paths (with /:locale prefix) and one for non-localized paths.

Called by PhoenixKit's integration via the route_module/0 callback.

Summary

Functions

Admin routes for localized paths (with /:locale prefix).

Admin routes for non-localized paths.

Prefix-aware path to the AI admin section (/admin/ai).

Functions

admin_locale_routes()

Admin routes for localized paths (with /:locale prefix).

admin_routes()

Admin routes for non-localized paths.

ai_path()

@spec ai_path() :: String.t()

Prefix-aware path to the AI admin section (/admin/ai).

Wraps core's generic PhoenixKit.Utils.Routes.path/1 so the plugin owns its own admin URL instead of a module-specific helper living in core's Routes util. Used by the AI admin LiveViews to build sort/navigation links.