Add test auth button
This commit is contained in:
parent
04f1561e96
commit
200f6f54f8
1 changed files with 19 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use reqwest::{Client, Method};
|
||||
use serde::Deserialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::process::Command;
|
||||
use tokio::{
|
||||
io::AsyncWriteExt,
|
||||
|
|
@ -85,5 +85,22 @@ pub async fn slack_auth() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
eprintln!("{:?}", res);
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
struct SlackAuthReq {
|
||||
slack_token: String,
|
||||
}
|
||||
|
||||
let res = client
|
||||
.post("https://burrow-hidden-pine-3298.fly.dev/slack-auth")
|
||||
.json(&SlackAuthReq {
|
||||
slack_token: res.id_token.unwrap(),
|
||||
})
|
||||
.send()
|
||||
.await
|
||||
.unwrap()
|
||||
.text()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
println!("{:?}", res);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue