summaryrefslogtreecommitdiff
path: root/webhook/src/handler/handler.rs
diff options
context:
space:
mode:
authorMatthieu <matthieu@developershouse.xyz>2021-10-18 13:52:21 +0400
committerMatthieu <matthieu@developershouse.xyz>2021-10-18 13:52:21 +0400
commit2c39f7a6a1c3113337bc4e56b6e3cfa92f703fb3 (patch)
tree01ceccb670f171c7bd12a5c0969c74572c5457e7 /webhook/src/handler/handler.rs
parent9023aa354902844b7d6100f55c3064afedd88966 (diff)
parentd55a128729ca94e727ce3a1ab4fb6af08d3cd109 (diff)
fix merge conflicts
Diffstat (limited to 'webhook/src/handler/handler.rs')
-rw-r--r--webhook/src/handler/handler.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/webhook/src/handler/handler.rs b/webhook/src/handler/handler.rs
index 74a1762..a07f995 100644
--- a/webhook/src/handler/handler.rs
+++ b/webhook/src/handler/handler.rs
@@ -19,12 +19,14 @@ use std::{
task::{Context, Poll},
time::Duration,
};
+use ed25519_dalek::PublicKey;
/// Hyper service used to handle the discord webhooks
#[derive(Clone)]
pub struct HandlerService {
pub config: Arc<Config>,
pub nats: Arc<Connection>,
+ pub public_key: Arc<PublicKey>
}
impl HandlerService {
@@ -38,7 +40,7 @@ impl HandlerService {
let contatenated_data = [timestamp.as_bytes().to_vec(), data.to_vec()].concat();
if let Ok(signature_str) = &signature.to_str() {
if validate_signature(
- &self.config.discord.public_key,
+ &self.public_key,
&contatenated_data,
signature_str,
) {