Dont auto-update the list

This commit is contained in:
Sakuhl 2018-03-20 11:41:17 +01:00
parent c4cc584c29
commit ba14bb8d50

View File

@ -32,13 +32,8 @@ fn list() -> String {
json
}
fn main() {
let server_handle = thread::Builder::new()
.spawn(|| {
rocket::ignite().mount("/", routes![list]).launch()
})
.unwrap();
#[get("/update-list")]
fn update_list() -> String {
if let Ok(guild_list) = wynncraft::guild_list() {
let conn = establish_connection();
@ -72,6 +67,14 @@ fn main() {
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();
}