👽 Update attachment reference to string

This commit is contained in:
LittleSheep 2024-08-18 21:27:55 +08:00
parent 4fac4a45b5
commit bed420c16d
3 changed files with 14 additions and 14 deletions

View File

@ -66,7 +66,7 @@ type PostStoryBody struct {
Title *string `json:"title"`
Content string `json:"content"`
Location *string `json:"location"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
}
type PostArticleBody struct {
@ -74,5 +74,5 @@ type PostArticleBody struct {
Title string `json:"title"`
Description *string `json:"description"`
Content string `json:"content"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
}

View File

@ -26,7 +26,7 @@ func createArticle(c *fiber.Ctx) error {
Description *string `json:"description"`
Content string `json:"content" validate:"required"`
Thumbnail *uint `json:"thumbnail"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"`
PublishedAt *time.Time `json:"published_at"`
@ -111,7 +111,7 @@ func editArticle(c *fiber.Ctx) error {
Description *string `json:"description"`
Content string `json:"content" validate:"required"`
Thumbnail *uint `json:"thumbnail"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"`
PublishedAt *time.Time `json:"published_at"`

View File

@ -26,7 +26,7 @@ func createStory(c *fiber.Ctx) error {
Content string `json:"content" validate:"required,max=4096"`
Location *string `json:"location"`
Thumbnail *uint `json:"thumbnail"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"`
PublishedAt *time.Time `json:"published_at"`
@ -130,7 +130,7 @@ func editStory(c *fiber.Ctx) error {
Content string `json:"content" validate:"required,max=4096"`
Thumbnail *uint `json:"thumbnail"`
Location *string `json:"location"`
Attachments []uint `json:"attachments"`
Attachments []string `json:"attachments"`
Tags []models.Tag `json:"tags"`
Categories []models.Category `json:"categories"`
PublishedAt *time.Time `json:"published_at"`