[WIP] A (somewhat barebones) atproto app for creating custom sites without hosting!

upload: use strings in config

Changed files
+2 -20
upload
src
+2 -20
upload/src/config.rs
··· 1 - pub enum Id { 2 - Handle(String), 3 - Did(String), 4 - } 5 - 6 pub struct Config { 7 - pub user: Id, 8 pub pword: String, 9 - pub dir: std::path::PathBuf, 10 } 11 12 pub enum ConfigErr { ··· 44 && let Some(pword) = pword.clone() 45 && let Some(dir) = dir.clone() 46 { 47 - // we do not validate that the did or handle is valid rn 48 - // but if it contains a : then its definitely a did 49 - let user = if user.contains(":") { 50 - Id::Did(user) 51 - } else { 52 - Id::Handle(user) 53 - }; 54 - 55 - let dir = std::path::Path::new(&dir); 56 - if !dir.is_dir() { 57 - return Err(ConfigErr::NotADirectory); 58 - }; 59 - 60 return Ok(Config { 61 user, 62 pword,
··· 1 pub struct Config { 2 + pub user: String, 3 pub pword: String, 4 + pub dir: String, 5 } 6 7 pub enum ConfigErr { ··· 39 && let Some(pword) = pword.clone() 40 && let Some(dir) = dir.clone() 41 { 42 return Ok(Config { 43 user, 44 pword,