feat:完善项目信息
This commit is contained in:
@ -39,6 +39,7 @@ func (*Service) InnovateDetail(c *gin.Context) {
|
||||
func (*Service) InnovateForm(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.IDStringForm
|
||||
api.TenantIDStringForm
|
||||
KindID string `json:"kind_id" form:"kind_id" binding:"required"`
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Content string `json:"content" form:"content" binding:"required"`
|
||||
@ -50,8 +51,9 @@ func (*Service) InnovateForm(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := service.NewInnovate()(api.GetSession()(c).(*session.Admin)).Form(&service.InnovateParams{
|
||||
ID: form.Convert(), KindID: (&api.IDStringForm{ID: form.KindID}).Convert(),
|
||||
Title: form.Title, Content: form.Content, Tags: form.Tags, Sort: form.Sort,
|
||||
ID: form.IDStringForm.Convert(), TenantID: form.TenantIDStringForm.Convert(),
|
||||
KindID: (&api.IDStringForm{ID: form.KindID}).Convert(),
|
||||
Title: form.Title, Content: form.Content, Tags: form.Tags, Sort: form.Sort,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -89,6 +91,7 @@ func (*Service) InnovateKindSelect(c *gin.Context) {
|
||||
func (*Service) InnovateKindForm(c *gin.Context) {
|
||||
form := &struct {
|
||||
api.IDStringForm
|
||||
api.TenantIDStringForm
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Sort int `json:"sort" form:"sort"`
|
||||
}{}
|
||||
@ -97,7 +100,7 @@ func (*Service) InnovateKindForm(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := service.NewInnovate()(api.GetSession()(c).(*session.Admin)).KindForm(&service.InnovateKindParams{
|
||||
ID: form.Convert(), Title: form.Title, Sort: form.Sort,
|
||||
ID: form.IDStringForm.Convert(), TenantID: form.TenantIDStringForm.Convert(), Title: form.Title, Sort: form.Sort,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user