mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-09-08 15:41:20 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user