Improve navbar
This commit is contained in:
parent
351c173357
commit
0e1995065b
3 changed files with 12 additions and 11 deletions
|
@ -19,16 +19,15 @@ pub fn logout(cookies: &CookieJar<'_>, referer: Referer) -> Redirect {
|
|||
params.insert("token", token);
|
||||
params
|
||||
};
|
||||
match client
|
||||
if let Err(error) = client
|
||||
.post("https://discord.com/api/oauth2/token/revoke")
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")
|
||||
.form(¶ms)
|
||||
.send()
|
||||
.await
|
||||
{
|
||||
Ok(_) => println!("Successfully revoked token"),
|
||||
Err(error) => println!("Failed to revoke token: {:?}", error),
|
||||
};
|
||||
println!("Failed to revoke token: {:?}", error);
|
||||
}
|
||||
});
|
||||
User::purge(cookies);
|
||||
let redirect_url = referer.0.unwrap_or("/".to_owned());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue