Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tzdanows committed Oct 9, 2023
1 parent 0894b9c commit 783fed3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tweets-backend/src/service/tweet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::time::Instant;

use mongodb::bson;
use mongodb::bson::doc;
use tonic::{Request, Response, Status};
use tonic::codegen::tokio_stream::StreamExt;
use tonic::{Request, Response, Status};
use tracing::info;
use uuid::Uuid;

Expand Down Expand Up @@ -68,7 +68,8 @@ impl TweetService for TweetServiceImpl {
info!("Batch-get Tweets");

let tweet_id = _request.into_inner().tweet_ids;
let mut cursor = self.client
let mut cursor = self
.client
.database(MongoDB::Tweets.name())
.collection(MongoCollection::Tweets.name())
.find(
Expand Down Expand Up @@ -135,7 +136,8 @@ impl TweetService for TweetServiceImpl {
info!("Find Most Recent Tweets By User");

let user_id = _request.into_inner().user_id;
let mut cursor = self.client
let mut cursor = self
.client
.database(MongoDB::Tweets.name())
.collection(MongoCollection::Tweets.name())
.find(
Expand All @@ -161,8 +163,8 @@ impl TweetService for TweetServiceImpl {

// Build and return the response
Ok(Response::new(BatchTweetResponse { tweets }))
}
}
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
struct TweetsDao {
Expand Down

0 comments on commit 783fed3

Please sign in to comment.