@@ -170,7 +170,8 @@ func registerHandler(app app.App) *mux.Router {
170170 protectedV1Route .HandleFunc ("/update" , app .UserHandler .UpdateProfileUser ).Methods (http .MethodPut )
171171 protectedV1Route .HandleFunc ("/delete" , app .UserHandler .DeleteUser ).Methods (http .MethodDelete )
172172
173- protectedV1Route .HandleFunc ("/events" , app .EventHandler .CreateEvent ).Methods (http .MethodPost )
173+ // protectedV1Route.HandleFunc("/events", app.EventHandler.CreateEvent).Methods(http.MethodPost)
174+ protectedV1Route .HandleFunc ("/events" , app .EventHandler .GetEvents ).Methods (http .MethodGet )
174175 protectedV1Route .HandleFunc ("/events/registrations" , app .EventHandler .RegisterEvent ).Methods (http .MethodPost )
175176 protectedV1Route .HandleFunc ("/events/registrations" , app .EventHandler .ListRegistration ).Methods (http .MethodGet )
176177 protectedV1Route .HandleFunc ("/events/pays" , app .EventHandler .ListEventPay ).Methods (http .MethodGet )
@@ -188,11 +189,11 @@ func registerHandler(app app.App) *mux.Router {
188189 protectedV1Route .HandleFunc ("/blogs/{id}" , app .BlogPostHandler .UpdateBlogPost ).Methods (http .MethodPatch )
189190 protectedV1Route .HandleFunc ("/blogs/{id}" , app .BlogPostHandler .DeleteBlogPost ).Methods (http .MethodDelete )
190191
192+ // Admin Route
193+ protectedV1AdminRoute .HandleFunc ("/events" , app .EventHandler .GetEvents ).Methods (http .MethodGet )
191194 protectedV1AdminRoute .HandleFunc ("/events" , app .EventHandler .CreateEvent ).Methods (http .MethodPost )
192- protectedV1Route .HandleFunc ("/events" , app .EventHandler .GetEvents ).Methods (http .MethodGet )
193195 protectedV1AdminRoute .HandleFunc ("/events/{id}" , app .EventHandler .DeleteEvent ).Methods (http .MethodDelete )
194196 protectedV1AdminRoute .HandleFunc ("/events/{id}" , app .EventHandler .GetDetail ).Methods (http .MethodGet )
195-
196197 protectedV1AdminRoute .HandleFunc ("/users" , app .UserHandler .GetUsers ).Methods (http .MethodGet )
197198
198199 return router
0 commit comments