diff --git a/server/handler/uast.go b/server/handler/uast.go new file mode 100644 index 0000000..66fee79 --- /dev/null +++ b/server/handler/uast.go @@ -0,0 +1,21 @@ +package handler + +import ( + "net/http" + + "github.com/src-d/gitbase-playground/server/serializer" +) + +// Parse : placeholder method +func Parse() RequestProcessFunc { + return func(r *http.Request) (*serializer.Response, error) { + return nil, serializer.NewHTTPError(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) + } +} + +// Filter : placeholder method +func Filter() RequestProcessFunc { + return func(r *http.Request) (*serializer.Response, error) { + return nil, serializer.NewHTTPError(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) + } +} diff --git a/server/router.go b/server/router.go index 627b35e..8a6120b 100644 --- a/server/router.go +++ b/server/router.go @@ -38,6 +38,9 @@ func Router( r.Post("/query", handler.APIHandlerFunc(handler.Query(db))) r.Get("/tables", handler.APIHandlerFunc(handler.Tables(db))) + r.Post("/parse", handler.APIHandlerFunc(handler.Parse())) + r.Post("/filter", handler.APIHandlerFunc(handler.Filter())) + r.Get("/version", handler.APIHandlerFunc(handler.Version(version))) r.Get("/static/*", static.ServeHTTP)