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