From aff24b4ce5be0172e34e02e06e7b5fa43026c4bf Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 22 Aug 2022 17:33:47 +0200 Subject: Hide password on users list --- server/src/routes/user.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/routes') diff --git a/server/src/routes/user.rs b/server/src/routes/user.rs index f155f27..1b43e01 100644 --- a/server/src/routes/user.rs +++ b/server/src/routes/user.rs @@ -1,12 +1,12 @@ use crate::errors::AppError; -use crate::models::user::User; +use crate::models::user::{User, UserList}; use axum::{routing::get, Json, Router}; pub fn create_route() -> Router { Router::new().route("/", get(list_users)) } -async fn list_users() -> Result>, AppError> { +async fn list_users() -> Result>, AppError> { let users = User::list().await?; Ok(Json(users)) -- cgit v1.2.3-18-g5258