🐛 Fix thumbnail setting

This commit is contained in:
LittleSheep 2024-12-07 17:19:49 +08:00
parent 2c138d06ee
commit e1aad5519c
3 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ func createArticle(c *fiber.Ctx) error {
Title string `json:"title" validate:"required,max=1024"` Title string `json:"title" validate:"required,max=1024"`
Description *string `json:"description"` Description *string `json:"description"`
Content string `json:"content" validate:"required"` Content string `json:"content" validate:"required"`
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Attachments []string `json:"attachments"` Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"` Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"` Categories []models.Category `json:"categories"`
@ -116,7 +116,7 @@ func editArticle(c *fiber.Ctx) error {
Title string `json:"title" validate:"required,max=1024"` Title string `json:"title" validate:"required,max=1024"`
Description *string `json:"description"` Description *string `json:"description"`
Content string `json:"content" validate:"required"` Content string `json:"content" validate:"required"`
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Attachments []string `json:"attachments"` Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"` Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"` Categories []models.Category `json:"categories"`

View File

@ -31,7 +31,7 @@ func createStory(c *fiber.Ctx) error {
Title *string `json:"title"` Title *string `json:"title"`
Content string `json:"content" validate:"required,max=4096"` Content string `json:"content" validate:"required,max=4096"`
Location *string `json:"location"` Location *string `json:"location"`
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Attachments []string `json:"attachments"` Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"` Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"` Categories []models.Category `json:"categories"`
@ -135,7 +135,7 @@ func editStory(c *fiber.Ctx) error {
Alias *string `json:"alias"` Alias *string `json:"alias"`
Title *string `json:"title"` Title *string `json:"title"`
Content string `json:"content" validate:"required,max=4096"` Content string `json:"content" validate:"required,max=4096"`
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Location *string `json:"location"` Location *string `json:"location"`
Attachments []string `json:"attachments"` Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"` Tags []models.Tag `json:"tags"`

View File

@ -65,7 +65,7 @@ type Post struct {
} }
type PostStoryBody struct { type PostStoryBody struct {
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Title *string `json:"title"` Title *string `json:"title"`
Content string `json:"content"` Content string `json:"content"`
Location *string `json:"location"` Location *string `json:"location"`
@ -73,7 +73,7 @@ type PostStoryBody struct {
} }
type PostArticleBody struct { type PostArticleBody struct {
Thumbnail *uint `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
Title string `json:"title"` Title string `json:"title"`
Description *string `json:"description"` Description *string `json:"description"`
Content string `json:"content"` Content string `json:"content"`