Update crates and change to UUID
This commit is contained in:
@ -5,6 +5,7 @@ use crate::websocket;
|
||||
use hyper::{body, header, Body, Method, Request, Response, StatusCode};
|
||||
use serde_json::{Map, Value};
|
||||
use std::str::FromStr;
|
||||
use uuid::Uuid;
|
||||
|
||||
async fn endpoint_handler(
|
||||
req: &mut Request<Body>,
|
||||
@ -63,12 +64,12 @@ async fn endpoint_handler(
|
||||
|
||||
let input = InputEnvelope {
|
||||
endpoint,
|
||||
to_domain,
|
||||
to_domain: Uuid::from_str(to_domain.as_str())?,
|
||||
from_domain: match req
|
||||
.headers()
|
||||
.get(header::HeaderName::from_str("From-Domain").unwrap())
|
||||
{
|
||||
Some(val) => Some(val.to_str()?.to_string()),
|
||||
Some(val) => Some(Uuid::from_str(val.to_str()?)?),
|
||||
None => None,
|
||||
},
|
||||
request_nr: None,
|
||||
|
Reference in New Issue
Block a user