Skip to content

Commit

Permalink
Move variable to const in main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
extua authored Jun 26, 2024
1 parent 1d86399 commit 31258d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion json_adder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use std::fs;
mod setup_db;
mod models;

const DATA_DIRECTORY: &str = "../../api.freifunk.net/data/history/";

#[tokio::main]

async fn main() -> mongodb::error::Result<()> {
let snapshot_collection: Collection<models::Community> = setup_db::get_collection().await;

for file in fs::read_dir("../../api.freifunk.net/data/history/").unwrap() {
for file in fs::read_dir(DATA_DIRECTORY).unwrap() {
// File path for sample json file, change this later
let file_path = file.unwrap().path();

Expand Down

0 comments on commit 31258d6

Please sign in to comment.