FIX: Use correct date for cached summary (#733)
This commit is contained in:
parent
d4c90bc2ba
commit
9d887ad4ac
|
@ -1,7 +1,12 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AiTopicSummarySerializer < ApplicationSerializer
|
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
|
def can_regenerate
|
||||||
scope.can_request_summary?
|
scope.can_request_summary?
|
||||||
|
|
|
@ -123,7 +123,7 @@ export default class AiSummaryBox extends Component {
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (update.done) {
|
if (update.done) {
|
||||||
this.summarizedOn = shortDateNoYear(topicSummary.summarized_on);
|
this.summarizedOn = shortDateNoYear(topicSummary.updated_at);
|
||||||
this.summarizedBy = topicSummary.algorithm;
|
this.summarizedBy = topicSummary.algorithm;
|
||||||
this.newPostsSinceSummary = topicSummary.new_posts_since_summary;
|
this.newPostsSinceSummary = topicSummary.new_posts_since_summary;
|
||||||
this.outdated = topicSummary.outdated;
|
this.outdated = topicSummary.outdated;
|
||||||
|
|
Loading…
Reference in New Issue