From e2b400fb12a6399fca8173c1494d5d8bda067c51 Mon Sep 17 00:00:00 2001 From: David Allen Date: Fri, 29 Aug 2025 19:26:50 -0600 Subject: [PATCH] refactor: added route impls and minor changes --- pkg/service/routes.go | 12 ++++++++++++ pkg/service/service.go | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkg/service/routes.go b/pkg/service/routes.go index 3d2db0b..42e7338 100644 --- a/pkg/service/routes.go +++ b/pkg/service/routes.go @@ -185,6 +185,18 @@ func (s *Service) Upload() http.HandlerFunc { } } +func (s *Service) UploadPlugin() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + + } +} + +func (s *Service) UploadProfile() http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + + } +} + func (s *Service) List() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var ( diff --git a/pkg/service/service.go b/pkg/service/service.go index d6c642f..c69d68f 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -100,8 +100,8 @@ func (s *Service) Serve() error { // 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/plugin", s.Upload()) - router.Post("/upload/profile", s.Upload()) + router.Post("/upload/plugin", s.UploadPlugin()) + router.Post("/upload/profile", s.UploadProfile()) router.Get("/list/*", s.List()) // profiles