Update crates and change to UUID

This commit is contained in:
2022-08-18 21:24:16 +02:00
parent 9227cdef9a
commit f2cdbe0638
11 changed files with 1835 additions and 144 deletions

@ -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,