diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-24 16:13:05 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-24 16:13:05 +0000 |
| commit | e3e1fb936e807a96e80229bc86d1c4bb385e88da (patch) | |
| tree | 92bae09802dc4d3d2ea6abf2b86e38058bc0983d /src/routes/user.rs | |
| parent | 357b9e646df220575df37fe1d6705a9667210997 (diff) | |
Use all paginators into `pagination` crate
Diffstat (limited to 'src/routes/user.rs')
| -rw-r--r-- | src/routes/user.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/routes/user.rs b/src/routes/user.rs index 172007a..bc87bf5 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -5,15 +5,13 @@ use crate::{ auth::Claims, user::{User, UserList}, }, - pagination::Pagination, - routes::model::ModelPagination, + pagination::{ModelPagination, Pagination, UserPagination}, }; use axum::{ extract::{ContentLengthLimit, Multipart, Path, Query}, routing::{get, put}, Json, Router, }; -use serde::Serialize; /// Create routes for `/v1/users/` namespace pub fn create_route() -> Router { @@ -25,12 +23,6 @@ pub fn create_route() -> Router { .route("/:id/models", get(get_user_models)) } -#[derive(Serialize)] -struct UserPagination { - count: i64, - results: Vec<UserList>, -} - /// List users. Checks Authorization token async fn list_users( _: Claims, |
