Fixed: fixed bug scrcpy and shell is disconnect when switch page
This commit is contained in:
parent
9543d4541c
commit
0fe469b5c6
43 changed files with 1378 additions and 1366 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"recipe-manager/middlewares"
|
||||
"recipe-manager/models"
|
||||
"recipe-manager/routers"
|
||||
routersV2 "recipe-manager/routers/v2"
|
||||
"recipe-manager/services/logger"
|
||||
"recipe-manager/services/oauth"
|
||||
"recipe-manager/services/recipe"
|
||||
|
|
@ -142,6 +143,19 @@ func (s *Server) createHandler() {
|
|||
|
||||
})
|
||||
|
||||
// Protected Group V2
|
||||
r.Group(func(r chi.Router) {
|
||||
r.Route("/v2", func(r chi.Router) {
|
||||
r.Use(func(next http.Handler) http.Handler {
|
||||
return middlewares.Authorize(s.oauth, userService, next)
|
||||
})
|
||||
|
||||
// Recipe Router
|
||||
rr := routersV2.NewRecipeRouter(s.data, s.taoLogger)
|
||||
rr.Route(r)
|
||||
})
|
||||
})
|
||||
|
||||
// routers.NewToppingRouter(s.data, s.taoLogger).Route(r)
|
||||
|
||||
r.NotFound(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue