From 08a9b9bdcf1404f29d8842aa496d14b07bb5eb06 Mon Sep 17 00:00:00 2001 From: David Allen Date: Fri, 29 Aug 2025 18:23:00 -0600 Subject: [PATCH] refactor: removed unused code and added routes --- pkg/service/profiles.go | 15 --------------- pkg/service/service.go | 4 +++- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/pkg/service/profiles.go b/pkg/service/profiles.go index 08aeff7..ee7a0d3 100644 --- a/pkg/service/profiles.go +++ b/pkg/service/profiles.go @@ -248,21 +248,6 @@ func (s *Service) GetProfileData() http.HandlerFunc { } } -// func (s *Service) CreateProfilePath() http.HandlerFunc { -// return func(w http.ResponseWriter, r *http.Request) { - -// w.WriteHeader(http.StatusOK) -// } -// } - -// func (s *Service) DeleteProfilePath() http.HandlerFunc { -// return func(w http.ResponseWriter, r *http.Request) {} -// } - -// func (s *Service) GetProfilePath() http.HandlerFunc { -// return func(w http.ResponseWriter, r *http.Request) {} -// } - func loadProfileContents(path string) ([]byte, error) { var ( contents []byte diff --git a/pkg/service/service.go b/pkg/service/service.go index 95f0c92..d6c642f 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -99,7 +99,9 @@ func (s *Service) Serve() error { // general // router.Handle("/download/*", http.StripPrefix("/download/", http.FileServer(http.Dir(s.PathForData())))) router.Get("/download/*", s.Download()) - router.Post("/upload", s.Upload()) + router.Post("/upload/", s.Upload()) + router.Post("/upload/plugin", s.Upload()) + router.Post("/upload/profile", s.Upload()) router.Get("/list/*", s.List()) // profiles