From bfc39c22f71de5041fe7702e9acc22b5b77bfa4a Mon Sep 17 00:00:00 2001 From: Maxime Date: Wed, 24 Apr 2024 10:22:23 +0200 Subject: [PATCH] add route 'app/silvermobi' + add CRUD functions in handler's folder --- handlers/application/silvermobi.go | 23 +++++++++++++++++++++++ main.go | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 handlers/application/silvermobi.go diff --git a/handlers/application/silvermobi.go b/handlers/application/silvermobi.go new file mode 100644 index 0000000..27309d5 --- /dev/null +++ b/handlers/application/silvermobi.go @@ -0,0 +1,23 @@ +package application + +import ( + "fmt" + "net/http" +) + + +func (h *ApplicationHandler) SilvermobiBookingList(w http.ResponseWriter, r *http.Request) { + fmt.Println("SilverBookingR") +} + +func (h *ApplicationHandler) SilvermobiBookingCreate(w http.ResponseWriter, r *http.Request){ + fmt.Println("SilverBookingC") +} + +func (h *ApplicationHandler) SilvermobiBookingUpdate(w http.ResponseWriter, r *http.Request){ + fmt.Println("SilverBookingU") +} + +func (h *ApplicationHandler) SilvermobiBookingDelete(w http.ResponseWriter, r *http.Request){ + fmt.Println("SilverBookingD") +} \ No newline at end of file diff --git a/main.go b/main.go index 1a4f88f..b43de57 100755 --- a/main.go +++ b/main.go @@ -137,6 +137,12 @@ func main() { application.HandleFunc("/support/", applicationHandler.SupportSend) /*********************** CODE GROUP **************************/ + // silvermobi + application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingCreate) + application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingList) + application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingUpdate) + application.HandleFunc("/app/silvermobi/", applicationHandler.SilvermobiBookingDelete) + appGroup := application.PathPrefix("/group_module").Subrouter() appGroup.HandleFunc("/", applicationHandler.Groups) appGroup.HandleFunc("/groups", applicationHandler.CreateGroupModule)