FIX: Use correct date for cached summary (#733)

This commit is contained in:
Rafael dos Santos Silva 2024-07-31 15:21:26 -03:00 committed by GitHub
parent d4c90bc2ba
commit 9d887ad4ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,12 @@
# frozen_string_literal: true
class AiTopicSummarySerializer < ApplicationSerializer
attributes :summarized_text, :algorithm, :outdated, :can_regenerate, :new_posts_since_summary
attributes :summarized_text,
:algorithm,
:outdated,
:can_regenerate,
:new_posts_since_summary,
:updated_at
def can_regenerate
scope.can_request_summary?

View File

@ -123,7 +123,7 @@ export default class AiSummaryBox extends Component {
})
.then(() => {
if (update.done) {
this.summarizedOn = shortDateNoYear(topicSummary.summarized_on);
this.summarizedOn = shortDateNoYear(topicSummary.updated_at);
this.summarizedBy = topicSummary.algorithm;
this.newPostsSinceSummary = topicSummary.new_posts_since_summary;
this.outdated = topicSummary.outdated;