Add ping route
This commit is contained in:
parent
5cc9492a00
commit
69b433def8
@ -8,11 +8,16 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
app.Get("/ping", PingHandler)
|
||||
app.Get("/status/java/:address", JavaStatusHandler)
|
||||
app.Get("/status/bedrock/:address", BedrockStatusHandler)
|
||||
app.Get("/icon/:address", IconHandler)
|
||||
}
|
||||
|
||||
func PingHandler(ctx *fiber.Ctx) error {
|
||||
return ctx.SendStatus(http.StatusOK)
|
||||
}
|
||||
|
||||
func JavaStatusHandler(ctx *fiber.Ctx) error {
|
||||
host, port, err := ParseAddress(ctx.Params("address"), 25565)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user