pinakes-server: update remaining route imports and handlers
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I67206fd813d514f8903041eea0a4cd266a6a6964
This commit is contained in:
parent
2b2c1830a1
commit
eb6c0a3577
20 changed files with 169 additions and 87 deletions
|
|
@ -4,7 +4,16 @@ use axum::{
|
|||
};
|
||||
use pinakes_core::users::{CreateUserRequest, UpdateUserRequest, UserId};
|
||||
|
||||
use crate::{dto::*, error::ApiError, state::AppState};
|
||||
use crate::{
|
||||
dto::{
|
||||
GrantLibraryAccessRequest,
|
||||
RevokeLibraryAccessRequest,
|
||||
UserLibraryResponse,
|
||||
UserResponse,
|
||||
},
|
||||
error::ApiError,
|
||||
state::AppState,
|
||||
};
|
||||
|
||||
/// List all users (admin only)
|
||||
pub async fn list_users(
|
||||
|
|
@ -175,7 +184,7 @@ pub async fn grant_library_access(
|
|||
|
||||
/// Revoke library access from a user (admin only)
|
||||
///
|
||||
/// Uses a JSON body instead of a path parameter because root_path may contain
|
||||
/// Uses a JSON body instead of a path parameter because `root_path` may contain
|
||||
/// slashes that conflict with URL routing.
|
||||
pub async fn revoke_library_access(
|
||||
State(state): State<AppState>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue