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
@@ -33,7 +33,6 @@ func ChannelAnyConfig(ctx *gin.Context) {
Width: cfg.Width,
}
httpx.WriteJSON(ctx, ret)
return
}
type webLikeWidgetConfig struct {
@@ -39,7 +39,6 @@ func ConversationGetBy(ctx *gin.Context, id int64) {
Participants: builders.BuildParticipantResponses(id),
}
httpx.WriteJSON(ctx, detail)
return
}
func ConversationPostCreate_or_match(ctx *gin.Context) {
@@ -60,7 +59,6 @@ func ConversationPostCreate_or_match(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, builders.BuildConversation(item))
return
}
func ConversationPostClose(ctx *gin.Context) {
@@ -84,5 +82,4 @@ func ConversationPostClose(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}
@@ -26,5 +26,4 @@ func CustomerPostSession_exchange(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, resp)
return
}
@@ -53,7 +53,6 @@ func MessageAnyList(ctx *gin.Context) {
)
results := builders.BuildMessages(list)
httpx.WriteJSON(ctx, httpx.CursorData(results, cast.ToString(nextCursor), hasMore))
return
}
func MessagePostSend(ctx *gin.Context) {
@@ -79,7 +78,6 @@ func MessagePostSend(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, builders.BuildMessage(item))
return
}
func MessagePostRead(ctx *gin.Context) {
@@ -103,7 +101,6 @@ func MessagePostRead(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, nil)
return
}
func MessagePostUpload_image(ctx *gin.Context) {
@@ -157,7 +154,6 @@ func MessagePostUpload_image(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, builders.BuildAsset(item))
return
}
func MessagePostUpload_attachment(ctx *gin.Context) {
@@ -197,5 +193,4 @@ func MessagePostUpload_attachment(ctx *gin.Context) {
return
}
httpx.WriteJSON(ctx, builders.BuildAsset(item))
return
}