feat: add logging for admin frontend client signin
This commit is contained in:
parent
02f5d2dc64
commit
aa1285c59c
|
|
@ -42,6 +42,7 @@ impl AdminFrontendClient {
|
|||
.send()
|
||||
.await
|
||||
.unwrap();
|
||||
let resp = check_resp(resp).await;
|
||||
let c = resp.cookies().find(|c| c.name() == "session_id").unwrap();
|
||||
self.session_id = Some(c.value().to_string());
|
||||
}
|
||||
|
|
@ -84,3 +85,12 @@ impl AdminFrontendClient {
|
|||
self.session_id.as_ref().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
async fn check_resp(resp: reqwest::Response) -> reqwest::Response {
|
||||
if resp.status() != 200 {
|
||||
println!("resp: {:#?}", resp);
|
||||
let payload = resp.text().await.unwrap();
|
||||
panic!("payload: {:#?}", payload)
|
||||
}
|
||||
resp
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue