mirror of
https://github.com/nkanaev/yarr.git
synced 2025-07-08 16:00:11 +00:00
refactoring
This commit is contained in:
parent
e4cc96ef09
commit
288fa3979a
@ -43,15 +43,15 @@ type FeverFeed struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FeverItem struct {
|
type FeverItem struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
FeedID int64 `json:"feed_id"`
|
FeedID int64 `json:"feed_id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Author string `json:"author"`
|
Author string `json:"author"`
|
||||||
HTML string `json:"html"`
|
HTML string `json:"html"`
|
||||||
Url string `json:"url"`
|
Url string `json:"url"`
|
||||||
IsSaved int `json:"is_saved"`
|
IsSaved int `json:"is_saved"`
|
||||||
IsRead int `json:"is_read"`
|
IsRead int `json:"is_read"`
|
||||||
CreatedOnTime int64 `json:"created_on_time"`
|
CreatedAt int64 `json:"created_on_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type FeverFavicon struct {
|
type FeverFavicon struct {
|
||||||
@ -241,7 +241,7 @@ func FeverItemsHandler(rw http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
time := int64(0)
|
time := int64(0)
|
||||||
if date != nil {
|
if date != nil {
|
||||||
time = date.UnixNano() / 1000_000_000
|
time = date.Unix()
|
||||||
}
|
}
|
||||||
|
|
||||||
isSaved := 0
|
isSaved := 0
|
||||||
@ -253,15 +253,15 @@ func FeverItemsHandler(rw http.ResponseWriter, req *http.Request) {
|
|||||||
isRead = 1
|
isRead = 1
|
||||||
}
|
}
|
||||||
feverItems[i] = FeverItem{
|
feverItems[i] = FeverItem{
|
||||||
ID: item.Id,
|
ID: item.Id,
|
||||||
FeedID: item.FeedId,
|
FeedID: item.FeedId,
|
||||||
Title: item.Title,
|
Title: item.Title,
|
||||||
Author: item.Author,
|
Author: item.Author,
|
||||||
HTML: item.Content,
|
HTML: item.Content,
|
||||||
Url: item.Link,
|
Url: item.Link,
|
||||||
IsSaved: isSaved,
|
IsSaved: isSaved,
|
||||||
IsRead: isRead,
|
IsRead: isRead,
|
||||||
CreatedOnTime: time,
|
CreatedAt: time,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user