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:
@@ -46,7 +46,6 @@ func KnowledgeRetrieveLogAnyList(ctx *gin.Context) {
|
||||
results = append(results, resp)
|
||||
}
|
||||
httpx.WriteJSON(ctx, &web.PageResult{Results: results, Page: paging})
|
||||
return
|
||||
}
|
||||
|
||||
func KnowledgeRetrieveLogGetBy(ctx *gin.Context, id int64) {
|
||||
@@ -76,5 +75,4 @@ func KnowledgeRetrieveLogGetBy(ctx *gin.Context, id int64) {
|
||||
Log: logResp,
|
||||
Hits: hitResults,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user