summaryrefslogtreecommitdiff
path: root/webhook/src/handle.rs
diff options
context:
space:
mode:
authorMatthieu <matthieu@developershouse.xyz>2021-09-09 22:16:39 +0400
committerMatthieu <matthieu@developershouse.xyz>2021-09-09 22:16:39 +0400
commit11912b050a97c258a8a38552d855f183c339beee (patch)
treed80f960beb4e0455cd8d0d8addb7b3308dda6933 /webhook/src/handle.rs
parente28d134370196d3e4d3ff9016a36cce011031e58 (diff)
gateway improvements, common packages and examples
Diffstat (limited to 'webhook/src/handle.rs')
-rw-r--r--webhook/src/handle.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/webhook/src/handle.rs b/webhook/src/handle.rs
index d08ee1f..b60889e 100644
--- a/webhook/src/handle.rs
+++ b/webhook/src/handle.rs
@@ -10,8 +10,7 @@ use std::pin::Pin;
use std::str::from_utf8;
use std::task::{Context, Poll};
use serde::{Deserialize, Serialize};
-
-use super::utils::Settings;
+use crate::config::Config;
pub fn validate_signature(b64_public_key: &str, data: &Vec<u8>, b64_signature: &str) -> bool {
// First, we need to check if the signature & private key is valid base64.
@@ -56,7 +55,7 @@ fn get_signature(headers: &HeaderMap) -> Option<(&str, &str)> {
}
pub struct HandlerService {
- pub config: Settings,
+ pub config: Config,
}
#[derive(Debug, Serialize, Deserialize)]
@@ -116,7 +115,7 @@ impl Service<Request<Body>> for HandlerService {
}
pub struct MakeSvc {
- pub settings: Settings,
+ pub settings: Config,
}
impl<T> Service<T> for MakeSvc {