update
This commit is contained in:
parent
c94220d13e
commit
29a8dcf827
@ -334,10 +334,7 @@ func (c *DocumentController) CreateBlock(ctx *fiber.Ctx) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if validationErrors, ok, err := validator.Struct(req); !ok {
|
if validationErrors, ok, err := validator.Struct(req); !ok {
|
||||||
if err != nil {
|
return dto.Ctx(ctx).Data(validationErrors).Error(err).Status(fiber.StatusBadRequest).Send()
|
||||||
return err
|
|
||||||
}
|
|
||||||
return dto.Ctx(ctx).Data(validationErrors).Status(fiber.StatusBadRequest).Send()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查文档是否存在
|
// 检查文档是否存在
|
||||||
|
@ -36,7 +36,7 @@ type ListDocumentsQueryParam struct {
|
|||||||
// CreateBlockRequest 创建文档块请求
|
// CreateBlockRequest 创建文档块请求
|
||||||
type CreateBlockRequest struct {
|
type CreateBlockRequest struct {
|
||||||
Type string `json:"type" validate:"required"`
|
Type string `json:"type" validate:"required"`
|
||||||
Content string `json:"content" validate:"required"`
|
Content string `json:"content"`
|
||||||
AfterBlockID *EntityId `json:"after_block_id,omitempty"`
|
AfterBlockID *EntityId `json:"after_block_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user