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
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user