diff options
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index f80aa60..d2a834f 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -333,7 +333,10 @@ pub async fn authenticate_user( | |||
333 | }) | 333 | }) |
334 | .unwrap(); | 334 | .unwrap(); |
335 | 335 | ||
336 | fs::write(format!("users/{}.guy", new_user.user_id), user_at_rest_json).unwrap(); | 336 | fs::write( |
337 | format!("users/{}/{}.guy", db.config.name, new_user.user_id), | ||
338 | user_at_rest_json | ||
339 | ).unwrap(); | ||
337 | 340 | ||
338 | let mut userlist = db.users.write(); | 341 | let mut userlist = db.users.write(); |
339 | userlist.insert(fingerprint.clone(), new_user); | 342 | userlist.insert(fingerprint.clone(), new_user); |
@@ -601,7 +604,7 @@ pub async fn propose_block( | |||
601 | let block_json = serde_json::to_string(&new_block).unwrap(); | 604 | let block_json = serde_json::to_string(&new_block).unwrap(); |
602 | 605 | ||
603 | fs::write( | 606 | fs::write( |
604 | format!("blocks/{}.block", new_block.timestamp.timestamp()), | 607 | format!("blocks/{}/{}.block", db.config.name, new_block.timestamp.timestamp()), |
605 | block_json, | 608 | block_json, |
606 | ) | 609 | ) |
607 | .unwrap(); | 610 | .unwrap(); |