Skip to content

Commit 2defca7

Browse files
drew-harrisskeptrunedev
authored andcommitted
feat: fixups and auth
1 parent e0c060c commit 2defca7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

server/src/handlers/webhook_handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct WebhookRespose {
2121
message: String,
2222
}
2323

24-
#[derive(Serialize, Deserialize, Debug)]
24+
#[derive(Serialize, Deserialize)]
2525
#[serde(rename_all = "camelCase")]
2626
pub enum Operation {
2727
Publish,
@@ -32,7 +32,7 @@ pub enum Operation {
3232
ScheduledEnd,
3333
}
3434

35-
#[derive(Serialize, Deserialize, Debug)]
35+
#[derive(Serialize, Deserialize)]
3636
#[serde(rename_all = "camelCase")]
3737
pub struct ContentValue {
3838
id: String,
@@ -84,7 +84,7 @@ impl From<ContentValue> for ChunkReqPayload {
8484
}
8585
}
8686

87-
#[derive(Serialize, Deserialize, Debug)]
87+
#[derive(Serialize, Deserialize)]
8888
#[serde(rename_all = "camelCase")]
8989
pub struct WebhookRequest {
9090
model_name: String,
@@ -94,7 +94,7 @@ pub struct WebhookRequest {
9494
operation: Operation,
9595
}
9696

97-
#[derive(Deserialize, Debug)]
97+
#[derive(Deserialize)]
9898
#[serde(rename_all = "camelCase")]
9999
pub struct WebhookQueryParams {
100100
trieve_key: String,

server/src/operators/webhook_operator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ pub async fn publish_content<T: Into<ChunkReqPayload>>(
7171
ServiceError::BadRequest("Failed to Serialize BulkUploadMessage".to_string())
7272
})?;
7373

74-
let _ = redis::cmd("lpush")
74+
redis::cmd("lpush")
7575
.arg("ingestion")
7676
.arg(&serialized_message)
77-
.query_async(&mut *redis_conn)
77+
.query_async::<redis::aio::MultiplexedConnection, usize>(&mut *redis_conn)
7878
.await
7979
.map_err(|err| ServiceError::BadRequest(err.to_string()))?;
8080

0 commit comments

Comments
 (0)