From 08f94bc26041d1c0ad0ff69a3751e0c56d29d55e Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Wed, 8 Jan 2025 23:02:17 +0000 Subject: [PATCH] Add a 200 response for GET / --- api/api.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/api.go b/api/api.go index 543048b..dfbbaf4 100644 --- a/api/api.go +++ b/api/api.go @@ -24,6 +24,10 @@ type apiDB interface { func New(upload *upload.Handler, keyStore *mjwt.KeyStore, db apiDB) *httprouter.Router { router := httprouter.New() + router.GET("/", func(rw http.ResponseWriter, req *http.Request, params httprouter.Params) { + http.Error(rw, "Bluebell API Endpoint", http.StatusOK) + }) + // Site upload endpoint router.POST("/u/:site/:branch", upload.Handle) router.POST("/u", func(rw http.ResponseWriter, req *http.Request, _ httprouter.Params) {