Refactor Admin Tools Template and Handler Context

- Updated the AdminTools template to format JSON payloads for better readability.
- Modified the HandleAdminTools function to create a template context with user information before rendering the AdminTools view.
This commit is contained in:
StarFleetCPTN
2025-03-20 21:23:59 -07:00
parent 7de4f57fc3
commit 874c7ad69e
2 changed files with 52 additions and 49 deletions
@@ -84,7 +84,10 @@ func (h *Handlers) HandleAdminTools(c *gin.Context) {
}
}
components.AdminTools(c.Request.Context(), data).Render(c.Request.Context(), c.Writer)
// Create template context with user information
ctx := components.CreateTemplateContext(c)
components.AdminTools(ctx, data).Render(ctx, c.Writer)
}
// HandleBackupDatabase handles the backup database request