Authentication

This commit is contained in:
2025-10-13 22:25:50 +02:00
parent 721a79cf74
commit e425461a29
2 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -13,9 +13,7 @@ struct AuthApiRes {
}
pub fn auth(_server: &Arc<Server>, client: &mut Client, token: &str) -> crate::Result<String> {
let mut res = ureq::get(format!(
"http://localhost:3000/api/auth?intents=server&token={token}"
))
let mut res = ureq::get(format!("https://vxchat.netlify.app/api/auth?token={token}"))
.call()
.context("Failed to authenticate")?;
let api_res: AuthApiRes = serde_json::from_str(&res.body_mut().read_to_string()?)?;
+1 -1
View File
@@ -28,7 +28,7 @@ pub mod handshake {
if !request_line.starts_with("GET") {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidData,
"Invalid HTTP method",
format!("Invalid HTTP method: {request_line}"),
));
}