Expand description
§Users Routes Module
This module defines and wires up routes for the /api/users
endpoint group.
§Structure
get.rs
— GET handlers (e.g., list users)put.rs
— PUT handlers (e.g., update user)delete.rs
— DELETE handlers (e.g., delete user)
§Middleware
The GET, PUT, and DELETE routes are protected using require_admin
middleware.
§Usage
The users_routes()
function returns a Router
which is nested under /users
in the main application.
Modules§
Functions§
- users_
routes - Builds the
/users
route group, mapping HTTP methods to handlers.