diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-03 14:56:36 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-03 14:56:36 +0400 |
| commit | f0cf9d95971b46f2219cbba2cf4dd7d52a606d88 (patch) | |
| tree | 150c877e4c02f37aa3fef0e297b8af562c22084a /exes | |
| parent | 27cb69cc6c30641abc6ccdf7dde19ea6c189d543 (diff) | |
add ci
Diffstat (limited to 'exes')
| -rw-r--r-- | exes/webhook/src/handler/handler.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/exes/webhook/src/handler/handler.rs b/exes/webhook/src/handler/handler.rs index af79185..896e43f 100644 --- a/exes/webhook/src/handler/handler.rs +++ b/exes/webhook/src/handler/handler.rs @@ -84,7 +84,7 @@ impl WebhookService { match value.kind { InteractionType::Ping => Ok(Response::builder() .header("Content-Type", "application/json") - .body(r#"{"t":1}"#.into()) + .body(r#"{"type":1}"#.into()) .unwrap()), _ => { debug!("calling nats"); @@ -113,7 +113,7 @@ impl WebhookService { { Ok(response) => Ok(Response::builder() .header("Content-Type", "application/json") - .body(Body::from(response.reply.unwrap())) + .body(Body::from(response.payload)) .unwrap()), Err(error) => { @@ -156,8 +156,7 @@ impl Service<hyper::Request<Body>> for WebhookService { } fn call(&mut self, req: Request<Body>) -> Self::Future { - let future = - Self::process_request(req, self.nats.clone(), self.config.discord.public_key); + let future = Self::process_request(req, self.nats.clone(), self.config.discord.public_key); Box::pin(async move { let response = future.await; |
