[management] Fix tests circular dependency (#3460)

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
Bethuel Mmbaga
2025-03-10 15:54:36 +03:00
committed by GitHub
parent d8bcf745b0
commit cc8f6bcaf3
34 changed files with 132 additions and 123 deletions

View File

@@ -19,10 +19,10 @@ import (
// handler is a handler that returns users of the account
type handler struct {
accountManager account.AccountManager
accountManager account.Manager
}
func AddEndpoints(accountManager account.AccountManager, router *mux.Router) {
func AddEndpoints(accountManager account.Manager, router *mux.Router) {
userHandler := newHandler(accountManager)
router.HandleFunc("/users", userHandler.getAllUsers).Methods("GET", "OPTIONS")
router.HandleFunc("/users/{userId}", userHandler.updateUser).Methods("PUT", "OPTIONS")
@@ -33,7 +33,7 @@ func AddEndpoints(accountManager account.AccountManager, router *mux.Router) {
}
// newHandler creates a new UsersHandler HTTP handler
func newHandler(accountManager account.AccountManager) *handler {
func newHandler(accountManager account.Manager) *handler {
return &handler{
accountManager: accountManager,
}