fix like two lines' formatting
This commit is contained in:
parent
f3935a8f0c
commit
8d9d3bcd13
|
@ -191,7 +191,7 @@ struct Perms{
|
||||||
}
|
}
|
||||||
#[get("/perms/<username>")]
|
#[get("/perms/<username>")]
|
||||||
async fn api_perms(mut db: Connection<Db>, username: String, cookies: &CookieJar<'_>) -> Json<ApiPermsResult> {
|
async fn api_perms(mut db: Connection<Db>, username: String, cookies: &CookieJar<'_>) -> Json<ApiPermsResult> {
|
||||||
match cookies.get_private("token") {
|
match cookies.get_private("token") {
|
||||||
Some(t) => {
|
Some(t) => {
|
||||||
match User::get_by_token(&mut db, t).await {
|
match User::get_by_token(&mut db, t).await {
|
||||||
Some(user) => {
|
Some(user) => {
|
||||||
|
@ -219,7 +219,6 @@ match cookies.get_private("token") {
|
||||||
}},
|
}},
|
||||||
None => {Json(ApiPermsResult { perms: Err("Not logged in".to_string())})}
|
None => {Json(ApiPermsResult { perms: Err("Not logged in".to_string())})}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
|
Loading…
Reference in New Issue