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
@@ -27,7 +27,6 @@ func AgentAnyList(ctx *gin.Context) {
).Desc("id"))
results := builders.BuildAgentProfileList(list)
httpx.WriteJSON(ctx, &web.PageResult{Results: results, Page: paging})
return
}
func AgentGetList_all(ctx *gin.Context) {
@@ -43,7 +42,6 @@ func AgentGetList_all(ctx *gin.Context) {
).Desc("id"))
httpx.WriteJSON(ctx, builders.BuildAgentProfileList(list))
return
}
func AgentGetBy(ctx *gin.Context, id int64) {
@@ -57,7 +55,6 @@ func AgentGetBy(ctx *gin.Context, id int64) {
return
}
httpx.WriteJSON(ctx, builders.BuildAgentProfileResponse(item))
return
}
func AgentPostCreate(ctx *gin.Context) {
@@ -77,7 +74,6 @@ func AgentPostCreate(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, builders.BuildAgentProfileResponse(item))
return
}
func AgentPostUpdate(ctx *gin.Context) {
@@ -96,7 +92,6 @@ func AgentPostUpdate(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}
func AgentPostDelete(ctx *gin.Context) {
@@ -114,5 +109,4 @@ func AgentPostDelete(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}