|
|
@ -8,13 +8,21 @@ use crate::models::User;
|
|
|
|
#[get("/testing")]
|
|
|
|
#[get("/testing")]
|
|
|
|
pub async fn testing(cookies: &CookieJar<'_>, http: &State<Http>) -> String {
|
|
|
|
pub async fn testing(cookies: &CookieJar<'_>, http: &State<Http>) -> String {
|
|
|
|
// Get logged in user's join date in 字ちゃん server
|
|
|
|
// Get logged in user's join date in 字ちゃん server
|
|
|
|
format!("{:?}", http.get_guild(814700630958276649).await
|
|
|
|
format!(
|
|
|
|
.expect("Failed to get testing guild")
|
|
|
|
"{:?}",
|
|
|
|
.member(http.deref(), User::get(cookies).await
|
|
|
|
http.get_guild(814700630958276649)
|
|
|
|
.expect("Failed to get logged in user data")
|
|
|
|
.await
|
|
|
|
.expect("No logged in user")
|
|
|
|
.expect("Failed to get testing guild")
|
|
|
|
.id
|
|
|
|
.member(
|
|
|
|
).await
|
|
|
|
http.deref(),
|
|
|
|
.expect("Failed to fetch user in server")
|
|
|
|
User::get(cookies)
|
|
|
|
.joined_at)
|
|
|
|
.await
|
|
|
|
}
|
|
|
|
.expect("Failed to get logged in user data")
|
|
|
|
|
|
|
|
.expect("No logged in user")
|
|
|
|
|
|
|
|
.id
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.await
|
|
|
|
|
|
|
|
.expect("Failed to fetch user in server")
|
|
|
|
|
|
|
|
.joined_at
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|