Skip to content

Commit

Permalink
style: delete commands APIs and Handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
lovehunter9 committed Feb 26, 2025
1 parent cd940a5 commit 184c53b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 118 deletions.
110 changes: 0 additions & 110 deletions packages/backend/http/commands.go

This file was deleted.

9 changes: 1 addition & 8 deletions packages/backend/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ func NewHandler(

api := r.PathPrefix("/api").Subrouter()

//users := api.PathPrefix("/users").Subrouter()
//users.Handle("", monkey(usersGetHandler, "")).Methods("GET")
//users.Handle("", monkey(userPostHandler, "")).Methods("POST")
//users.Handle("/{id:[0-9]+}", monkey(userPutHandler, "")).Methods("PUT")
//users.Handle("/{id:[0-9]+}", monkey(userGetHandler, "")).Methods("GET")
//users.Handle("/{id:[0-9]+}", monkey(userDeleteHandler, "")).Methods("DELETE")

api.PathPrefix("/resources").Handler(monkey(resourceGetHandler, "/api/resources")).Methods("GET")
api.PathPrefix("/resources").Handler(monkey(resourceDeleteHandler(fileCache), "/api/resources")).Methods("DELETE")
api.PathPrefix("/resources").Handler(monkey(resourcePostHandler(fileCache), "/api/resources")).Methods("POST")
Expand All @@ -80,7 +73,7 @@ func NewHandler(
api.PathPrefix("/preview/{size}/{path:.*}").
Handler(monkey(previewHandler(imgSvc, fileCache, server.EnableThumbnails, server.ResizePreview), "/api/preview")).Methods("GET")

api.PathPrefix("/command").Handler(monkey(commandsHandler, "/api/command")).Methods("GET")
//api.PathPrefix("/command").Handler(monkey(commandsHandler, "/api/command")).Methods("GET")
//if rpc.KnowledgeBaseEnabled == "True" {
// api.HandleFunc("/get_dataset_folder_status_test", ginHandlerAdapter(rpc.RpcEngine))
// api.HandleFunc("/update_dataset_folder_paths_test", ginHandlerAdapter(rpc.RpcEngine))
Expand Down

0 comments on commit 184c53b

Please sign in to comment.