Dont auto-update the list
This commit is contained in:
parent
c4cc584c29
commit
ba14bb8d50
17
src/main.rs
17
src/main.rs
@ -32,13 +32,8 @@ fn list() -> String {
|
|||||||
json
|
json
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
#[get("/update-list")]
|
||||||
let server_handle = thread::Builder::new()
|
fn update_list() -> String {
|
||||||
.spawn(|| {
|
|
||||||
rocket::ignite().mount("/", routes![list]).launch()
|
|
||||||
})
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
if let Ok(guild_list) = wynncraft::guild_list() {
|
if let Ok(guild_list) = wynncraft::guild_list() {
|
||||||
let conn = establish_connection();
|
let conn = establish_connection();
|
||||||
|
|
||||||
@ -72,6 +67,14 @@ fn main() {
|
|||||||
|
|
||||||
println!("Guilds updated!");
|
println!("Guilds updated!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let server_handle = thread::Builder::new()
|
||||||
|
.spawn(|| {
|
||||||
|
rocket::ignite().mount("/", routes![list, update_list]).launch()
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
server_handle.join().unwrap();
|
server_handle.join().unwrap();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user