From f268656b207a77837048c4ddef7b9da3e545822d Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Tue, 17 Oct 2023 00:11:44 +0100 Subject: [PATCH] Add API endpoint response --- servers/api/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/api/api.go b/servers/api/api.go index 87b7b36..fcf16aa 100644 --- a/servers/api/api.go +++ b/servers/api/api.go @@ -18,6 +18,10 @@ import ( func NewApiServer(conf *conf.Conf, compileTarget utils.MultiCompilable) *http.Server { r := httprouter.New() + r.GET("/", func(rw http.ResponseWriter, req *http.Request, params httprouter.Params) { + http.Error(rw, "Violet API Endpoint", http.StatusOK) + }) + // Endpoint for compile action r.POST("/compile", checkAuthWithPerm(conf.Signer, "violet:compile", func(rw http.ResponseWriter, req *http.Request, _ httprouter.Params, b AuthClaims) { // Trigger the compile action