From d916976e09802ca2cb3f54a19eed4b8d8cf37183 Mon Sep 17 00:00:00 2001 From: Joshua Seals Date: Wed, 7 Aug 2024 11:33:22 -0400 Subject: [PATCH] remove subroute... been a min --- main.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/main.go b/main.go index 68872be..97f20a4 100644 --- a/main.go +++ b/main.go @@ -2053,21 +2053,21 @@ func livenessHandler(w http.ResponseWriter, r *http.Request) { func main() { router := mux.NewRouter() // r.HandleFunc("/onPush", webhookHandler) - protected := router.PathPrefix("/").Subrouter() - protected.Use(AuthMiddleware) - - protected.HandleFunc("/repos", handleRepo) - protected.HandleFunc("/repos", handleRepo) - protected.HandleFunc("/users", handleUser) - protected.HandleFunc("/repos/collaborators", handleRepoCollaborator) - protected.HandleFunc("/repos/modify", handleModifyRepoFiles).Methods("POST") - protected.HandleFunc("/repos/download", handleDownloadRepo).Methods("GET") - protected.HandleFunc("/forks", handleFork) - protected.HandleFunc("/orgs", handleOrg) - protected.HandleFunc("/orgs/{orgName}/members", handleGetMembers).Methods("GET") - protected.HandleFunc("/orgs/{orgName}/members/{userName}", handleAddMember).Methods("PUT") - protected.HandleFunc("/readiness", readinessHandler) - protected.HandleFunc("/liveness", livenessHandler) + router.Use(AuthMiddleware) + + router.HandleFunc("/repos", handleRepo) + router.HandleFunc("/repos", handleRepo) + router.HandleFunc("/repos", handleRepo) + router.HandleFunc("/users", handleUser) + router.HandleFunc("/repos/collaborators", handleRepoCollaborator) + router.HandleFunc("/repos/modify", handleModifyRepoFiles).Methods("POST") + router.HandleFunc("/repos/download", handleDownloadRepo).Methods("GET") + router.HandleFunc("/forks", handleFork) + router.HandleFunc("/orgs", handleOrg) + router.HandleFunc("/orgs/{orgName}/members", handleGetMembers).Methods("GET") + router.HandleFunc("/orgs/{orgName}/members/{userName}", handleAddMember).Methods("PUT") + router.HandleFunc("/readiness", readinessHandler) + router.HandleFunc("/liveness", livenessHandler) srv := &http.Server{ Handler: router,