@@ -30,27 +30,27 @@ func (s *Server) SetupRoutes() {
30
30
func (s * Server ) registerRoutes (r * gin.RouterGroup ) {
31
31
// farms routes
32
32
publicFarmRoutes := r .Group ("farms" )
33
- publicFarmRoutes .GET ("/ " , s .listFarmsHandler )
33
+ publicFarmRoutes .GET ("" , s .listFarmsHandler )
34
34
publicFarmRoutes .GET ("/:farm_id" , s .getFarmHandler )
35
35
// protected by farmer key
36
36
protectedFarmRoutes := r .Group ("farms" , s .AuthMiddleware ())
37
- protectedFarmRoutes .POST ("/ " , s .createFarmHandler )
37
+ protectedFarmRoutes .POST ("" , s .createFarmHandler )
38
38
protectedFarmRoutes .PATCH ("/:farm_id" , s .updateFarmHandler )
39
39
40
40
// nodes routes
41
41
publicNodeRoutes := r .Group ("nodes" )
42
- publicNodeRoutes .GET ("/ " , s .listNodesHandler )
42
+ publicNodeRoutes .GET ("" , s .listNodesHandler )
43
43
publicNodeRoutes .GET ("/:node_id" , s .getNodeHandler )
44
44
// protected by node key
45
45
protectedNodeRoutes := r .Group ("nodes" , s .AuthMiddleware ())
46
- protectedNodeRoutes .POST ("/ " , s .registerNodeHandler )
46
+ protectedNodeRoutes .POST ("" , s .registerNodeHandler )
47
47
protectedNodeRoutes .PATCH ("/:node_id" , s .updateNodeHandler )
48
48
protectedNodeRoutes .POST ("/:node_id/uptime" , s .uptimeReportHandler )
49
49
50
50
// Account routes
51
51
publicAccountRoutes := r .Group ("accounts" )
52
- publicAccountRoutes .POST ("/ " , s .createAccountHandler )
53
- publicAccountRoutes .GET ("/ " , s .getAccountHandler )
52
+ publicAccountRoutes .POST ("" , s .createAccountHandler )
53
+ publicAccountRoutes .GET ("" , s .getAccountHandler )
54
54
// protected by farmer key
55
55
protectedAccountRoutes := r .Group ("accounts" , s .AuthMiddleware ())
56
56
protectedAccountRoutes .PATCH ("/:twin_id" , s .updateAccountHandler )
0 commit comments