added pagination to a given authors page
This commit is contained in:
@@ -121,20 +121,11 @@ async fn main() {
|
||||
|
||||
// build our application with some routes
|
||||
let app = Router::new()
|
||||
.nest("/", routes::root::RootRoute::routes())
|
||||
.nest("/posts", routes::posts::PostsRoute::routes(&app_state))
|
||||
.nest(
|
||||
"/comments",
|
||||
routes::comments::CommentsRoute::routes(&app_state),
|
||||
)
|
||||
.nest(
|
||||
"/authors",
|
||||
routes::authors::AuthorsRoute::routes(&app_state),
|
||||
)
|
||||
.nest(
|
||||
"/projects",
|
||||
routes::projects::ProjectsRoute::routes(&app_state),
|
||||
)
|
||||
.merge(routes::root::RootRoute::routes())
|
||||
.merge(routes::posts::PostsRoute::routes(&app_state))
|
||||
.merge(routes::comments::CommentsRoute::routes(&app_state))
|
||||
.merge(routes::authors::AuthorsRoute::routes(&app_state))
|
||||
.merge(routes::projects::ProjectsRoute::routes(&app_state))
|
||||
.layer(CorsLayer::permissive())
|
||||
.layer(
|
||||
TraceLayer::new_for_http()
|
||||
@@ -179,3 +170,5 @@ async fn shutdown_signal() {
|
||||
_ = terminate => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user