From 8b53114d0dd88c3d32d5954f85bd0d4196150dcc Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Sun, 19 Nov 2023 23:55:43 -0500 Subject: [PATCH] Have the file-service depend on the new authdb library --- file-service/Cargo.toml | 6 ++---- file-service/src/lib.rs | 3 +-- file-service/src/main.rs | 7 ++++--- file-service/src/store/mod.rs | 2 -- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/file-service/Cargo.toml b/file-service/Cargo.toml index 051898d..b1045b7 100644 --- a/file-service/Cargo.toml +++ b/file-service/Cargo.toml @@ -14,13 +14,10 @@ path = "src/lib.rs" name = "file-service" path = "src/main.rs" -[[bin]] -name = "auth-cli" -path = "src/bin/cli.rs" - [target.auth-cli.dependencies] [dependencies] +authdb = { path = "../authdb/" } base64ct = { version = "1", features = [ "alloc" ] } build_html = { version = "2" } bytes = { version = "1" } @@ -38,6 +35,7 @@ mime_guess = "2.0.3" pretty_env_logger = { version = "0.5" } serde_json = "*" serde = { version = "1.0", features = ["derive"] } +sha2 = { version = "0.10" } thiserror = { version = "1" } tokio = { version = "1", features = [ "full" ] } uuid = { version = "0.4", features = [ "serde", "v4" ] } diff --git a/file-service/src/lib.rs b/file-service/src/lib.rs index 0325109..86fedfb 100644 --- a/file-service/src/lib.rs +++ b/file-service/src/lib.rs @@ -1,6 +1,5 @@ mod store; pub use store::{ - AuthDB, AuthError, AuthToken, DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, - SessionToken, Store, Username, WriteFileError, + DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, Store, WriteFileError, }; diff --git a/file-service/src/main.rs b/file-service/src/main.rs index c9d70df..e34f23d 100644 --- a/file-service/src/main.rs +++ b/file-service/src/main.rs @@ -18,9 +18,10 @@ mod pages; const MAX_UPLOAD: u64 = 15 * 1024 * 1024; -pub use file_service::{ - AuthDB, AuthError, AuthToken, DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, - SessionToken, Store, Username, WriteFileError, +use authdb::{AuthDB, AuthError, AuthToken, SessionToken, Username}; + +use file_service::{ + DeleteFileError, FileHandle, FileId, FileInfo, ReadFileError, Store, WriteFileError, }; pub use handlers::handle_index; diff --git a/file-service/src/store/mod.rs b/file-service/src/store/mod.rs index c4ddd2d..9399dfe 100644 --- a/file-service/src/store/mod.rs +++ b/file-service/src/store/mod.rs @@ -1,8 +1,6 @@ -use base64ct::{Base64, Encoding}; use serde::{Deserialize, Serialize}; use std::{collections::HashSet, ops::Deref, path::PathBuf}; use thiserror::Error; -use uuid::Uuid; mod filehandle; mod fileinfo;