Add a 200 response for GET /

This commit is contained in:
Melon 2025-01-08 23:02:17 +00:00
parent 369e43b054
commit 08f94bc260
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -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) {