refactor: removed unused code and added routes
This commit is contained in:
parent
b18746957d
commit
08a9b9bdcf
2 changed files with 3 additions and 16 deletions
|
|
@ -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) {
|
func loadProfileContents(path string) ([]byte, error) {
|
||||||
var (
|
var (
|
||||||
contents []byte
|
contents []byte
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,9 @@ func (s *Service) Serve() error {
|
||||||
// general
|
// general
|
||||||
// router.Handle("/download/*", http.StripPrefix("/download/", http.FileServer(http.Dir(s.PathForData()))))
|
// router.Handle("/download/*", http.StripPrefix("/download/", http.FileServer(http.Dir(s.PathForData()))))
|
||||||
router.Get("/download/*", s.Download())
|
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())
|
router.Get("/list/*", s.List())
|
||||||
|
|
||||||
// profiles
|
// profiles
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue