Fixes Patches Creation & More
Working with files / Paths fixed Websocket PingPongs (There is no data behind this just PingPong) Storing User Profiles correctly Added necessary dependencies and initial code support for: - X.509 certificate handling via x509/pkcs8 crates - Key generation and crypto operations via x448/sha2 - Structured hex encoding and base64 encoding
This commit is contained in:
parent
bba3f548ab
commit
0d07ddf851
23 changed files with 887 additions and 266 deletions
|
|
@ -6,12 +6,7 @@ use uuid::Uuid;
|
|||
pub struct UserCommunityUtil;
|
||||
|
||||
impl UserCommunityUtil {
|
||||
pub fn add_community(
|
||||
storage_owner: Uuid,
|
||||
address: String,
|
||||
title: String,
|
||||
position: String,
|
||||
) {
|
||||
pub fn add_community(storage_owner: Uuid, address: String, title: String, position: String) {
|
||||
let path = format!("users/{}/communities.json", storage_owner);
|
||||
let mut communities: JsonValue = Self::load_array(&path);
|
||||
|
||||
|
|
@ -58,7 +53,7 @@ impl UserCommunityUtil {
|
|||
if let Some(parent) = Path::new(path).parent() {
|
||||
let _ = fs::create_dir_all(parent);
|
||||
}
|
||||
|
||||
|
||||
let _ = fs::write(path, arr.pretty(3));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue