Skip to content

Commit fd7679e

Browse files
committed
style: gofmt whitespace — trailing newline + blank line cleanup
1 parent be8261f commit fd7679e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

internal/api/data/handlers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ func (h *Handler) GetData(c *gin.Context) {
342342
"interval": interval.String(),
343343
})
344344
}
345+
345346
// privateIPNets contains RFC-1918, loopback, link-local, and Docker default ranges.
346347
var privateIPNets = func() []*net.IPNet {
347348
cidrs := []string{
@@ -375,4 +376,4 @@ func isPrivateIP(ipStr string) bool {
375376
}
376377
}
377378
return false
378-
}
379+
}

internal/api/devices/handlers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ func (h *Handler) DeleteDevice(c *gin.Context) {
302302

303303
c.JSON(http.StatusOK, gin.H{"status": "Device deleted"})
304304
}
305+
305306
// UpdateDevice updates a device's name, type, and/or status.
306307
// PUT /dev/:device_id
307308
func (h *Handler) UpdateDevice(c *gin.Context) {
@@ -333,7 +334,7 @@ func (h *Handler) UpdateDevice(c *gin.Context) {
333334
c.JSON(http.StatusForbidden, gin.H{"error": "Unauthorized"})
334335
return
335336
}
336-
337+
337338
// Only admin can change status
338339
if req.Status != "" && role != "admin" {
339340
c.JSON(http.StatusForbidden, gin.H{"error": "Only admins can update device status"})
@@ -348,7 +349,6 @@ func (h *Handler) UpdateDevice(c *gin.Context) {
348349
c.JSON(http.StatusOK, gin.H{"message": "Device updated successfully"})
349350
}
350351

351-
352352
// UpdateDeviceConfig updates the desired configuration.
353353
// PATCH /dev/:device_id/config
354354
func (h *Handler) UpdateDeviceConfig(c *gin.Context) {

0 commit comments

Comments
 (0)