Expose changed_at
time through the API
No issue This is already stored and updated in the DB to render the History page but is currently not exposed through the API
This commit is contained in:
parent
b4cdef6875
commit
77dc6aaf27
3 changed files with 5 additions and 0 deletions
|
@ -189,6 +189,7 @@ type Entry struct {
|
|||
URL string `json:"url"`
|
||||
Date time.Time `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ChangedAt time.Time `json:"changed_at"`
|
||||
Content string `json:"content"`
|
||||
Author string `json:"author"`
|
||||
ShareCode string `json:"share_code"`
|
||||
|
|
|
@ -29,6 +29,7 @@ type Entry struct {
|
|||
CommentsURL string `json:"comments_url"`
|
||||
Date time.Time `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ChangedAt time.Time `json:"changed_at"`
|
||||
Content string `json:"content"`
|
||||
Author string `json:"author"`
|
||||
ShareCode string `json:"share_code"`
|
||||
|
|
|
@ -233,6 +233,7 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) {
|
|||
e.starred,
|
||||
e.reading_time,
|
||||
e.created_at,
|
||||
e.changed_at,
|
||||
f.title as feed_title,
|
||||
f.feed_url,
|
||||
f.site_url,
|
||||
|
@ -294,6 +295,7 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) {
|
|||
&entry.Starred,
|
||||
&entry.ReadingTime,
|
||||
&entry.CreatedAt,
|
||||
&entry.ChangedAt,
|
||||
&entry.Feed.Title,
|
||||
&entry.Feed.FeedURL,
|
||||
&entry.Feed.SiteURL,
|
||||
|
@ -322,6 +324,7 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) {
|
|||
// Make sure that timestamp fields contains timezone information (API)
|
||||
entry.Date = timezone.Convert(tz, entry.Date)
|
||||
entry.CreatedAt = timezone.Convert(tz, entry.CreatedAt)
|
||||
entry.ChangedAt = timezone.Convert(tz, entry.ChangedAt)
|
||||
entry.Feed.CheckedAt = timezone.Convert(tz, entry.Feed.CheckedAt)
|
||||
|
||||
entry.Feed.ID = entry.FeedID
|
||||
|
|
Loading…
Reference in a new issue