diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2022-09-09 09:31:25 +0000 |
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2022-09-09 09:31:25 +0000 |
| commit | e8c799cb65f58c1e9a4b2809489ef3b5760638d8 (patch) | |
| tree | 44373b0b59bb868598f9012fc15c327603e4cf87 /src/routes | |
| parent | acc32ccc1650b99e03c390a87e71b0a85b073162 (diff) | |
Serialize author' info for models
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/model.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/model.rs b/src/routes/model.rs index b1d4cc2..a5cd2b3 100644 --- a/src/routes/model.rs +++ b/src/routes/model.rs @@ -1,7 +1,7 @@ use crate::errors::AppError; use crate::models::{ auth::Claims, - model::{Model, ModelCreate}, + model::{Model, ModelCreate, ModelUser}, }; use axum::{routing::get, Json, Router}; @@ -11,7 +11,7 @@ pub fn create_route() -> Router { } /// List models. -async fn list_models() -> Result<Json<Vec<Model>>, AppError> { +async fn list_models() -> Result<Json<Vec<ModelUser>>, AppError> { let models = Model::list().await?; Ok(Json(models)) |
