Skip to content

Commit 2a4084c

Browse files
committed
fix: rm already declared fn
1 parent 07c22cd commit 2a4084c

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

api.go

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -802,42 +802,6 @@ func (h *APIHandler) handleClearAllMessages(c *gin.Context) {
802802
h.respondSuccess(c, "All message buffers cleared", data)
803803
}
804804

805-
// handleGetListenStatus returns listening status for a specific interface
806-
func (h *APIHandler) handleGetListenStatus(c *gin.Context) {
807-
if h.messageListener == nil {
808-
h.respondError(c, http.StatusServiceUnavailable, "Message listener not available", nil)
809-
return
810-
}
811-
812-
ifName := c.Param("interface")
813-
if ifName == "" {
814-
h.respondError(c, http.StatusBadRequest, "Interface name is required", nil)
815-
return
816-
}
817-
818-
isListening := h.messageListener.IsListening(ifName)
819-
820-
data := map[string]interface{}{
821-
"interface": ifName,
822-
"isListening": isListening,
823-
"status": func() string {
824-
if isListening {
825-
return "listening"
826-
}
827-
return "not_listening"
828-
}(),
829-
}
830-
831-
// Add statistics if listening
832-
if isListening {
833-
if stats, err := h.messageListener.GetInterfaceStatistics(ifName); err == nil {
834-
data["statistics"] = stats
835-
}
836-
}
837-
838-
h.respondSuccess(c, "", data)
839-
}
840-
841805
// handleGetAllListenStatus returns listening status for all interfaces
842806
func (h *APIHandler) handleGetAllListenStatus(c *gin.Context) {
843807
if h.messageListener == nil {

0 commit comments

Comments
 (0)