Create posts file if it does not exist

This commit is contained in:
Justine Pelletreau 2023-07-03 17:10:05 +02:00
parent 56e7e0da17
commit e67bfe9b58

View File

@ -46,6 +46,7 @@ fn save_post(text: &str) {
let mut file = OpenOptions::new()
.write(true)
.append(true)
.create(true)
.open("./Files/posts.json")
.unwrap();