feat:完善信息
This commit is contained in:
@ -89,6 +89,17 @@ func (*Technology) PatentExamine(c *gin.Context) {
|
||||
|
||||
}
|
||||
|
||||
func (*Technology) PatentShelf(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology.NewPatent()(api.GetSession()(c).(*session.Admin)).Shelf(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) PatentDelete(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
@ -209,6 +220,17 @@ func (*Technology) ProductExamine(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) ProductShelf(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology.NewProduct()(api.GetSession()(c).(*session.Admin)).Shelf(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) ProductDelete(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
@ -259,6 +281,17 @@ func (*Technology) AchievementDetail(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Technology) AchievementShelf(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology.NewAchievement()(api.GetSession()(c).(*session.Admin)).Shelf(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) AchievementDelete(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
@ -337,6 +370,17 @@ func (*Technology) Project(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Technology) ProjectShelf(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology.NewProject()(api.GetSession()(c).(*session.Admin)).Shelf(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Technology) ProjectDelete(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user