xmr-remote-nodes/handler/routes.go

23 lines
523 B
Go
Raw Normal View History

package handler
import (
"github.com/gofiber/fiber/v2"
)
// V1 API routes
func V1Api(app *fiber.App) {
v1 := app.Group("/api/v1")
// these routes are public, they don't require a prober api key
v1.Get("/nodes", Nodes)
2024-05-04 10:24:47 +00:00
v1.Post("/nodes", AddNode)
v1.Get("/nodes/id/:id", Node)
2024-05-06 10:19:17 +00:00
v1.Get("/nodes/logs", ProbeLogs)
v1.Get("/fees", NetFees)
v1.Get("/countries", Countries)
// these routes are for prober, they require a prober api key
2024-05-04 12:52:22 +00:00
v1.Get("/job", CheckProber, GiveJob)
2024-05-04 18:42:47 +00:00
v1.Post("/job", CheckProber, ProcessJob)
}