feat:完善项目信息
This commit is contained in:
@ -291,3 +291,29 @@ func (*Manage) AgentExamine(c *gin.Context) {
|
||||
err := form.handle(api.GetSession()(c).(*session.Admin), nil)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (*Manage) Enterprise(c *gin.Context) {
|
||||
form := &struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
Mode int `json:"mode" form:"mode" binding:"required"`
|
||||
api.PageForm
|
||||
}{}
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewEnterprise()(api.GetSession()(c).(*session.Admin)).Instance(form.Name, form.Mode, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (*Manage) EnterpriseDelete(c *gin.Context) {
|
||||
form := new(api.IDStringForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Admin)).Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user