remove AiSummarized attribute from article view model
This commit is contained in:
@@ -9,9 +9,6 @@
|
|||||||
<p class="pb-2">
|
<p class="pb-2">
|
||||||
<span class="badge badge-outline">{{ .ShortSource }}</span>
|
<span class="badge badge-outline">{{ .ShortSource }}</span>
|
||||||
<span class="badge badge-outline">{{ .PublishDate }}</span>
|
<span class="badge badge-outline">{{ .PublishDate }}</span>
|
||||||
{{if .AiSummarized}}
|
|
||||||
<span class="badge badge-outline">ai summary</span>
|
|
||||||
{{end}}
|
|
||||||
</p>
|
</p>
|
||||||
<p class="card-text">{{ .Summary }}</p>
|
<p class="card-text">{{ .Summary }}</p>
|
||||||
<div class="flex flex-row-reverse">
|
<div class="flex flex-row-reverse">
|
||||||
|
|||||||
@@ -26,12 +26,11 @@ func (a *Article) Clone() *Article {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ArticleViewModel struct {
|
type ArticleViewModel struct {
|
||||||
Id int
|
Id int
|
||||||
Title string
|
Title string
|
||||||
PublishDate string
|
PublishDate string
|
||||||
ShortSource string
|
ShortSource string
|
||||||
Summary string
|
Summary string
|
||||||
AiSummarized bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ArticlePageViewModel struct {
|
type ArticlePageViewModel struct {
|
||||||
|
|||||||
@@ -48,9 +48,6 @@ func (m *ArticleViewModelRepository) All(limit int, offset int) ([]*model.Articl
|
|||||||
a.ShortSource = ""
|
a.ShortSource = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// ai summary always false
|
|
||||||
a.AiSummarized = false
|
|
||||||
|
|
||||||
articleVMs = append(articleVMs, &a)
|
articleVMs = append(articleVMs, &a)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,9 +98,6 @@ func (m *ArticleViewModelRepository) Search(query string) ([]*model.ArticleViewM
|
|||||||
a.ShortSource = ""
|
a.ShortSource = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// ai summary always false
|
|
||||||
a.AiSummarized = false
|
|
||||||
|
|
||||||
articleVMs = append(articleVMs, a)
|
articleVMs = append(articleVMs, a)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user