Refactor controllers to remove unnecessary return statements after JSON responses

- Removed redundant return statements in various controller functions across the dashboard module.
- This change improves code readability and maintains the same functionality.
This commit is contained in:
mlogclub
2026-05-23 22:23:44 +08:00
parent e9d2e41f9e
commit 1852f9df8b
32 changed files with 0 additions and 188 deletions
@@ -35,7 +35,6 @@ func CompanyAnyList(ctx *gin.Context) {
results[i].CustomerCount = countMap[results[i].ID]
}
httpx.WriteJSON(ctx, &web.PageResult{Results: results, Page: paging})
return
}
func CompanyGetBy(ctx *gin.Context, id int64) {
@@ -50,7 +49,6 @@ func CompanyGetBy(ctx *gin.Context, id int64) {
}
ret := builders.BuildCompany(item)
httpx.WriteJSON(ctx, &ret)
return
}
func CompanyPostCreate(ctx *gin.Context) {
@@ -71,7 +69,6 @@ func CompanyPostCreate(ctx *gin.Context) {
}
ret := builders.BuildCompany(item)
httpx.WriteJSON(ctx, &ret)
return
}
func CompanyPostUpdate(ctx *gin.Context) {
@@ -90,7 +87,6 @@ func CompanyPostUpdate(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}
func CompanyPostDelete(ctx *gin.Context) {
@@ -109,7 +105,6 @@ func CompanyPostDelete(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}
func CompanyPostUpdate_status(ctx *gin.Context) {
@@ -128,5 +123,4 @@ func CompanyPostUpdate_status(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}