Add /about endpoint
This commit is contained in:
16
handlers/about.go
Normal file
16
handlers/about.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"git.sr.ht/~cwpearson/replicate-jump-server/config"
|
||||
)
|
||||
|
||||
func AboutGet(c echo.Context) error {
|
||||
return c.JSON(http.StatusOK, map[string]string{
|
||||
"version": config.GitSHA(),
|
||||
"build-date": config.BuildDate(),
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user