mirror of https://gitee.com/answerdev/answer.git
Merge branch 'feat/tag/search' into 'main'
fix: fix update site general info incorrect request process See merge request opensource/answer!38
This commit is contained in:
commit
704e79e0c0
|
@ -56,7 +56,9 @@ func (sc *SiteInfoController) GetInterface(ctx *gin.Context) {
|
|||
// @Router /answer/admin/api/siteinfo/general [put]
|
||||
func (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context) {
|
||||
req := schema.SiteGeneralReq{}
|
||||
handler.BindAndCheck(ctx, &req)
|
||||
if handler.BindAndCheck(ctx, &req) {
|
||||
return
|
||||
}
|
||||
err := sc.siteInfoService.SaveSiteGeneral(ctx, req)
|
||||
handler.HandleResponse(ctx, err, nil)
|
||||
}
|
||||
|
@ -72,7 +74,9 @@ func (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context) {
|
|||
// @Router /answer/admin/api/siteinfo/interface [put]
|
||||
func (sc *SiteInfoController) UpdateInterface(ctx *gin.Context) {
|
||||
req := schema.SiteInterfaceReq{}
|
||||
handler.BindAndCheck(ctx, &req)
|
||||
if handler.BindAndCheck(ctx, &req) {
|
||||
return
|
||||
}
|
||||
err := sc.siteInfoService.SaveSiteInterface(ctx, req)
|
||||
handler.HandleResponse(ctx, err, nil)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue