feat(account): #49 implement account get, insert, update and delete
Some checks failed
Build Docker Image / Build-Docker-Image (push) Has been cancelled

This commit is contained in:
2025-05-07 18:49:56 +02:00
parent c8daf6a04d
commit ef40f04f11
14 changed files with 363 additions and 181 deletions

View File

@@ -2,10 +2,11 @@ package middleware
import "net/http"
// Chain list of handlers together
func Wrapper(next http.Handler, handlers ...func(http.Handler) http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
lastHandler := next
for i := len(handlers) - 1; i >= 0; i-- {
for i := 0; i < len(handlers); i++ {
lastHandler = handlers[i](lastHandler)
}
lastHandler.ServeHTTP(w, r)