More common handler interface

This commit is contained in:
Hein
2025-12-02 15:45:24 +02:00
parent 08050c960d
commit 9c5c7689e9
10 changed files with 406 additions and 38 deletions

View File

@@ -34,6 +34,12 @@ func NewHandler(db common.Database, registry common.ModelRegistry) *Handler {
return handler
}
// GetDatabase returns the underlying database connection
// Implements common.SpecHandler interface
func (h *Handler) GetDatabase() common.Database {
return h.db
}
// handlePanic is a helper function to handle panics with stack traces
func (h *Handler) handlePanic(w common.ResponseWriter, method string, err interface{}) {
stack := debug.Stack()