mirror of
https://github.com/Damillora/Yuriko.git
synced 2024-11-21 17:27:33 +00:00
Remove primary tag from database
This commit is contained in:
parent
c7ff45976f
commit
e77fabd25e
@ -53,7 +53,6 @@ func Webhook(c *gin.Context) {
|
||||
Slug: body.Post.Current.Slug,
|
||||
Excerpt: body.Post.Current.Excerpt,
|
||||
HtmlMarkup: body.Post.Current.HtmlMarkup,
|
||||
PrimaryTag: body.Post.Current.PrimaryTag,
|
||||
PublishedAt: float64(time.Unix()),
|
||||
}
|
||||
services.ImportArticle(newArticle)
|
||||
|
@ -46,10 +46,6 @@ func CreateDatabaseSchema() {
|
||||
Name: "html",
|
||||
Type: "string",
|
||||
},
|
||||
{
|
||||
Name: "primary_tag",
|
||||
Type: "string",
|
||||
},
|
||||
{
|
||||
Name: "published_at",
|
||||
Type: "int64",
|
||||
|
@ -7,7 +7,6 @@ type Article struct {
|
||||
Slug string `json:"slug"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
HtmlMarkup string `json:"html"`
|
||||
PrimaryTag string `json:"primary_tag"`
|
||||
PublishedAt float64 `json:"published_at"`
|
||||
}
|
||||
|
||||
@ -18,7 +17,6 @@ type ArticleCreateModel struct {
|
||||
Slug string `json:"slug"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
HtmlMarkup string `json:"html"`
|
||||
PrimaryTag string `json:"primary_tag"`
|
||||
PublishedAt float64 `json:"published_at"`
|
||||
}
|
||||
|
||||
@ -28,6 +26,5 @@ type ArticleSearchResult struct {
|
||||
Slug string `json:"slug"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
HtmlMarkup string `json:"html"`
|
||||
PrimaryTag string `json:"primary_tag"`
|
||||
PublishedAt string `json:"published_at"`
|
||||
}
|
||||
|
@ -14,6 +14,5 @@ type WebhookPost struct {
|
||||
Slug string `json:"slug"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
HtmlMarkup string `json:"html"`
|
||||
PrimaryTag string `json:"primary_tag"`
|
||||
PublishedAt string `json:"published_at"`
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ func SearchArticles(q string, page int) (SearchResult, error) {
|
||||
perPage := 10
|
||||
searchParameters := &api.SearchCollectionParams{
|
||||
Q: q,
|
||||
QueryBy: []string{"title","slug","primary_tag","excerpt","html"},
|
||||
QueryBy: []string{"title", "slug", "primary_tag", "excerpt", "html"},
|
||||
Page: &page,
|
||||
PerPage: &perPage,
|
||||
}
|
||||
@ -36,7 +36,6 @@ func SearchArticles(q string, page int) (SearchResult, error) {
|
||||
Url: hit.Document["url"].(string),
|
||||
Slug: hit.Document["slug"].(string),
|
||||
Excerpt: hit.Document["excerpt"].(string),
|
||||
HtmlMarkup: hit.Document["html"].(string),
|
||||
PublishedAt: time.Unix(int64(hit.Document["published_at"].(float64)), 0).String(),
|
||||
}
|
||||
articles = append(articles, article)
|
||||
|
Loading…
Reference in New Issue
Block a user