Files
openlan/pkg/api/version.go
2022-07-29 23:38:54 +08:00

20 lines
357 B
Go
Executable File

package api
import (
"github.com/gorilla/mux"
"github.com/luscis/openlan/pkg/schema"
"net/http"
)
type Version struct {
}
func (l Version) Router(router *mux.Router) {
router.HandleFunc("/api/version", l.List).Methods("GET")
}
func (l Version) List(w http.ResponseWriter, r *http.Request) {
ver := schema.NewVersionSchema()
ResponseJson(w, ver)
}