deleted: main_dc/yalarba/api_yal/internal/handlers/account.go
deleted: main_dc/yalarba/api_yal/internal/handlers/allHandlers.go modified: main_dc/yalarba/api_yal/internal/router/router.go delete ald arch files
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
package handlers
|
||||
|
||||
import "net/http"
|
||||
|
||||
type AccountHandler struct{}
|
||||
|
||||
func NewAccountHandler() *AccountHandler {
|
||||
return &AccountHandler{}
|
||||
}
|
||||
|
||||
func (h *AccountHandler) HandleRegister(w http.ResponseWriter, r *http.Request){
|
||||
return
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package handlers
|
||||
|
||||
import "api_yal/internal/service"
|
||||
|
||||
type AllHandler struct {
|
||||
authHandler *AuthHandler
|
||||
}
|
||||
|
||||
func NewAllHandler(accountHandler AccountHandler) *AllHandler {
|
||||
return &AllHandler{
|
||||
authHandler: NewAuthHandler(service.AccountService),
|
||||
}
|
||||
}
|
||||
|
||||
func (h *AllHandler) AccountHandler() AccountHandler {
|
||||
return h.accountHandler
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package router
|
||||
import (
|
||||
"api_yal/internal/config"
|
||||
"api_yal/internal/logger"
|
||||
"api_yal/internal/handlers"
|
||||
|
||||
"encoding/json"
|
||||
"github.com/go-chi/chi/v5"
|
||||
@@ -16,7 +15,6 @@ func SetupRouter(db *gorm.DB, config *config.Config) http.Handler {
|
||||
zapLogger := logger.Get()
|
||||
zapLogger.Info("Start setup routers")
|
||||
r := chi.NewRouter()
|
||||
h := handlers.NewAllHandler()
|
||||
|
||||
// Health check
|
||||
r.Get("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -25,10 +23,6 @@ func SetupRouter(db *gorm.DB, config *config.Config) http.Handler {
|
||||
json.NewEncoder(w).Encode(map[string]string{"status": "healthy"})
|
||||
})
|
||||
|
||||
r.Route("/auth", func(r chi.Router) {
|
||||
r.Post("/register", h.AuthHandler().Register)
|
||||
})
|
||||
|
||||
zapLogger.Info("End setup routers")
|
||||
|
||||
// Логируем все зарегистрированные маршруты
|
||||
|
||||
Reference in New Issue
Block a user