feat: add uploader

This commit is contained in:
2026-04-29 19:26:59 +09:00
parent 960cf95df9
commit 68d4294049
7 changed files with 122 additions and 2 deletions

View File

@@ -84,6 +84,16 @@ pub async fn delete_files(
Ok(Json(json!({ "deleted": deleted })))
}
pub async fn list_my_files(
State(state): State<Arc<AppState>>,
auth: AuthUser,
) -> Result<Json<FilesMetaResponse>, AppError> {
let files = storage::list_user_files(&state.config.data_dir, &auth.username)
.await
.map_err(AppError::Io)?;
Ok(Json(FilesMetaResponse { files }))
}
pub async fn upload_file(
State(state): State<Arc<AppState>>,
auth: AuthUser,