Update test

This commit is contained in:
Dominic Grimm 2022-12-19 20:55:50 +01:00
parent 7224fada5d
commit 7fc623dbe5
No known key found for this signature in database
GPG Key ID: 6F294212DEAAC530
1 changed files with 15 additions and 12 deletions

View File

@ -344,19 +344,22 @@ impl Client {
}
pub async fn login_api(&mut self) -> Result<String> {
let jwt = reqwest::Client::new()
.get(self.api_url.join("token/new")?)
.header(
reqwest::header::COOKIE,
self.session.as_ref().context("Not logged in")?,
)
.send()
.await?
.text()
.await?;
self.authorization = Some(jwt.to_string());
dbg!(self.session.as_ref().context("Not logged in")?);
// let jwt = reqwest::Client::new()
// .get(self.api_url.join("token/new")?)
// .header(
// reqwest::header::COOKIE,
// self.session.as_ref().context("Not logged in")?,
// )
// .send()
// .await?
// .text()
// .await?;
// self.authorization = Some(jwt.to_string());
Ok(jwt)
// Ok(jwt)
bail!("ddd");
}
pub async fn login(&mut self) -> Result<()> {