Skip to content

Commit d1bec0d

Browse files
authored
fix(quotes): make quotes response as general as tweet itself
1 parent e8a8036 commit d1bec0d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tweets/tweets.service.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,11 +803,13 @@ export class TweetsService {
803803
const quotes = await query.getMany();
804804

805805
// Map to DTOs
806-
const quote_dtos = quotes.map((quote) =>
807-
plainToInstance(TweetQuoteResponseDTO, quote.quote_tweet, {
806+
const quote_dtos = quotes.map((quote) => {
807+
const quote_temp = plainToInstance(TweetQuoteResponseDTO, quote.quote_tweet, {
808808
excludeExtraneousValues: true,
809-
})
810-
);
809+
});
810+
quote_temp.parent_tweet_id = tweet_id;
811+
return quote_temp;
812+
});
811813

812814
// Generate next_cursor using pagination service
813815
const quote_tweets = quotes.map((q) => q.quote_tweet);

0 commit comments

Comments
 (0)